summaryrefslogtreecommitdiff
path: root/samples/kfifo/dma-example.c
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2017-07-12 14:34:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 16:26:01 -0700
commit9263969a46fc899092ba4f8c4206fa2340c9a64e (patch)
treeb1c5f949d67f56e897e08018cfa59274d0962248 /samples/kfifo/dma-example.c
parent46d10a094353c05144f3b0530516bdac3ce7c435 (diff)
downloadlinux-exynos-9263969a46fc899092ba4f8c4206fa2340c9a64e.tar.gz
linux-exynos-9263969a46fc899092ba4f8c4206fa2340c9a64e.tar.bz2
linux-exynos-9263969a46fc899092ba4f8c4206fa2340c9a64e.zip
kfifo: clean up example to not use page_link
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/1495663199-22234-1-git-send-email-logang@deltatee.com Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Stephen Bates <sbates@raithlin.com> Acked-by: Stefani Seibold <stefani@seibold.net> Cc: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples/kfifo/dma-example.c')
-rw-r--r--samples/kfifo/dma-example.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c
index aa243db93f01..be0d4a5fdf53 100644
--- a/samples/kfifo/dma-example.c
+++ b/samples/kfifo/dma-example.c
@@ -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;
@@ -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;