kfifo: clean up example to not use page_link
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 12 Jul 2017 21:34:22 +0000 (14:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Jul 2017 23:26:01 +0000 (16:26 -0700)
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>
samples/kfifo/dma-example.c

index aa243db93f01fb88e32ad6fdd990f11034a4b18f..be0d4a5fdf53629d1ceeb38dc5953f619277f8e4 100644 (file)
@@ -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;