Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9263969a authored by Logan Gunthorpe's avatar Logan Gunthorpe Committed by Linus Torvalds
Browse files

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: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarStephen Bates <sbates@raithlin.com>
Acked-by: default avatarStefani Seibold <stefani@seibold.net>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 46d10a09
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -75,8 +75,8 @@ static int __init example_init(void)
	for (i = 0; i < nents; i++) {
	for (i = 0; i < nents; i++) {
		printk(KERN_INFO
		printk(KERN_INFO
		"sg[%d] -> "
		"sg[%d] -> "
		"page_link 0x%.8lx offset 0x%.8x length 0x%.8x\n",
		"page %p offset 0x%.8x length 0x%.8x\n",
			i, sg[i].page_link, sg[i].offset, sg[i].length);
			i, sg_page(&sg[i]), sg[i].offset, sg[i].length);


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


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