Skip to content

Commit

Permalink
kfifo: clean up example to not use page_link
Browse files Browse the repository at this point in the history
This is a layering violation so we replace the uses with calls to
sg_page().  This is a prep patch for replacing page_link and this is one
of the very few uses outside of scatterlist.h.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Logan Gunthorpe <[email protected]>
Signed-off-by: Stephen Bates <[email protected]>
Acked-by: Stefani Seibold <[email protected]>
Cc: Stefani Seibold <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
lsgunth authored and torvalds committed Jul 12, 2017
1 parent 46d10a0 commit 9263969
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/kfifo/dma-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ static int __init example_init(void)
for (i = 0; i < nents; i++) {
printk(KERN_INFO
"sg[%d] -> "
"page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n",
i, sg[i].page_link, sg[i].offset, sg[i].length);
"page %p offset 0x%.8x length 0x%.8x\n",
i, sg_page(&sg[i]), sg[i].offset, sg[i].length);

if (sg_is_last(&sg[i]))
break;
Expand Down Expand Up @@ -104,8 +104,8 @@ static int __init example_init(void)
for (i = 0; i < nents; i++) {
printk(KERN_INFO
"sg[%d] -> "
"page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n",
i, sg[i].page_link, sg[i].offset, sg[i].length);
"page %p offset 0x%.8x length 0x%.8x\n",
i, sg_page(&sg[i]), sg[i].offset, sg[i].length);

if (sg_is_last(&sg[i]))
break;
Expand Down

0 comments on commit 9263969

Please sign in to comment.