Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4ced7ead
Commit
4ced7ead
authored
Feb 01, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dmapool: use dev_err() whenever we can to get the better information in it.
parent
c884ee80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
drivers/base/dmapool.c
drivers/base/dmapool.c
+24
-12
No files found.
drivers/base/dmapool.c
View file @
4ced7ead
...
@@ -237,9 +237,12 @@ dma_pool_destroy (struct dma_pool *pool)
...
@@ -237,9 +237,12 @@ dma_pool_destroy (struct dma_pool *pool)
page
=
list_entry
(
pool
->
page_list
.
next
,
page
=
list_entry
(
pool
->
page_list
.
next
,
struct
dma_page
,
page_list
);
struct
dma_page
,
page_list
);
if
(
is_page_busy
(
pool
->
blocks_per_page
,
page
->
bitmap
))
{
if
(
is_page_busy
(
pool
->
blocks_per_page
,
page
->
bitmap
))
{
printk
(
KERN_ERR
"dma_pool_destroy %s/%s, %p busy
\n
"
,
if
(
pool
->
dev
)
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
dev_err
(
pool
->
dev
,
"dma_pool_destroy %s, %p busy
\n
"
,
pool
->
name
,
page
->
vaddr
);
pool
->
name
,
page
->
vaddr
);
else
printk
(
KERN_ERR
"dma_pool_destroy %s, %p busy
\n
"
,
pool
->
name
,
page
->
vaddr
);
/* leak the still-in-use consistent memory */
/* leak the still-in-use consistent memory */
list_del
(
&
page
->
page_list
);
list_del
(
&
page
->
page_list
);
kfree
(
page
);
kfree
(
page
);
...
@@ -362,9 +365,12 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
...
@@ -362,9 +365,12 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
int
map
,
block
;
int
map
,
block
;
if
((
page
=
pool_find_page
(
pool
,
dma
))
==
0
)
{
if
((
page
=
pool_find_page
(
pool
,
dma
))
==
0
)
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, %p/%lx (bad dma)
\n
"
,
if
(
pool
->
dev
)
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
dev_err
(
pool
->
dev
,
"dma_pool_free %s, %p/%lx (bad dma)
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, %p/%lx (bad dma)
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
)
dma
);
return
;
return
;
}
}
...
@@ -375,15 +381,21 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
...
@@ -375,15 +381,21 @@ dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)
#ifdef CONFIG_DEBUG_SLAB
#ifdef CONFIG_DEBUG_SLAB
if
(((
dma
-
page
->
dma
)
+
(
void
*
)
page
->
vaddr
)
!=
vaddr
)
{
if
(((
dma
-
page
->
dma
)
+
(
void
*
)
page
->
vaddr
)
!=
vaddr
)
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, %p (bad vaddr)/%Lx
\n
"
,
if
(
pool
->
dev
)
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
dev_err
(
pool
->
dev
,
"dma_pool_free %s, %p (bad vaddr)/%Lx
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, %p (bad vaddr)/%Lx
\n
"
,
pool
->
name
,
vaddr
,
(
unsigned
long
long
)
dma
);
return
;
return
;
}
}
if
(
page
->
bitmap
[
map
]
&
(
1UL
<<
block
))
{
if
(
page
->
bitmap
[
map
]
&
(
1UL
<<
block
))
{
printk
(
KERN_ERR
"dma_pool_free %s/%s, dma %Lx already free
\n
"
,
if
(
pool
->
dev
)
pool
->
dev
?
pool
->
dev
->
bus_id
:
NULL
,
dev_err
(
pool
->
dev
,
"dma_pool_free %s, dma %Lx already free
\n
"
,
pool
->
name
,
(
unsigned
long
long
)
dma
);
pool
->
name
,
(
unsigned
long
long
)
dma
);
else
printk
(
KERN_ERR
"dma_pool_free %s, dma %Lx already free
\n
"
,
pool
->
name
,
(
unsigned
long
long
)
dma
);
return
;
return
;
}
}
memset
(
vaddr
,
POOL_POISON_FREED
,
pool
->
size
);
memset
(
vaddr
,
POOL_POISON_FREED
,
pool
->
size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment