From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164270AbdEXWAR (ORCPT ); Wed, 24 May 2017 18:00:17 -0400 Received: from ale.deltatee.com ([207.54.116.67]:37338 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161133AbdEXWAO (ORCPT ); Wed, 24 May 2017 18:00:14 -0400 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org Cc: Logan Gunthorpe , Stephen Bates , Stefani Seibold , Greg KH , Andrew Morton Date: Wed, 24 May 2017 15:59:59 -0600 Message-Id: <1495663199-22234-1-git-send-email-logang@deltatee.com> X-Mailer: git-send-email 2.1.4 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, logang@deltatee.com, sbates@raithlin.com, stefani@seibold.net, greg@kroah.com, akpm@linux-foundation.org X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH] kfifo: cleanup example to not use page_link X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Stefani Seibold Cc: Greg KH Cc: Andrew Morton --- samples/kfifo/dma-example.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c index aa243db..be0d4a5 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; -- 2.1.4