summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2017-07-12 17:34:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-12 19:26:01 -0400
commit9263969a46fc899092ba4f8c4206fa2340c9a64e (patch)
treeb1c5f949d67f56e897e08018cfa59274d0962248
parent46d10a094353c05144f3b0530516bdac3ce7c435 (diff)
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>
-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)
75 for (i = 0; i < nents; i++) { 75 for (i = 0; i < nents; i++) {
76 printk(KERN_INFO 76 printk(KERN_INFO
77 "sg[%d] -> " 77 "sg[%d] -> "
78 "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", 78 "page %p offset 0x%.8x length 0x%.8x\n",
79 i, sg[i].page_link, sg[i].offset, sg[i].length); 79 i, sg_page(&sg[i]), sg[i].offset, sg[i].length);
80 80
81 if (sg_is_last(&sg[i])) 81 if (sg_is_last(&sg[i]))
82 break; 82 break;
@@ -104,8 +104,8 @@ static int __init example_init(void)
104 for (i = 0; i < nents; i++) { 104 for (i = 0; i < nents; i++) {
105 printk(KERN_INFO 105 printk(KERN_INFO
106 "sg[%d] -> " 106 "sg[%d] -> "
107 "page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n", 107 "page %p offset 0x%.8x length 0x%.8x\n",
108 i, sg[i].page_link, sg[i].offset, sg[i].length); 108 i, sg_page(&sg[i]), sg[i].offset, sg[i].length);
109 109
110 if (sg_is_last(&sg[i])) 110 if (sg_is_last(&sg[i]))
111 break; 111 break;