From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757013AbbLHQQA (ORCPT ); Tue, 8 Dec 2015 11:16:00 -0500 Received: from mga03.intel.com ([134.134.136.65]:53327 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756957AbbLHQP7 (ORCPT ); Tue, 8 Dec 2015 11:15:59 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,400,1444719600"; d="scan'208";a="614594214" Date: Tue, 8 Dec 2015 21:48:38 +0530 From: Vinod Koul To: Arnd Bergmann Cc: "Dmitry V. Krivenok" , Nicolas Ferre , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dan Williams , dmaengine@vger.kernel.org Subject: Re: [PATCH] dmaengine: at_hdmac: fix dma_addr_t printing Message-ID: <20151208161838.GS1854@localhost> References: <24590899.3e2244jrdI@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24590899.3e2244jrdI@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2015 at 04:34:28PM +0100, Arnd Bergmann wrote: > A recent patch tried to improve the printk output of the atc_dump_lli() > function but introduced a bug, in which we end up dereferencing a > dma address as a pointer, and we even get a warning for it: > > drivers/dma/at_hdmac_regs.h: In function 'atc_dump_lli': > drivers/dma/at_hdmac_regs.h:388:4: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] > > This changes the code to pass the DMA address by reference, as expected > by printk. Thanks for this but i was planning to drop 096117032a36 "dmaengine: do not use 0x in front of %pad" as recomended by Dmitry, so we should fix this cleanly I will push out updated tree in a short while... > > Signed-off-by: Arnd Bergmann > Fixes: 096117032a36 ("dmaengine: do not use 0x in front of %pad") > --- > drivers/dma/at_hdmac_regs.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h > index 610907dbc11a..0474e4a0f02a 100644 > --- a/drivers/dma/at_hdmac_regs.h > +++ b/drivers/dma/at_hdmac_regs.h > @@ -386,8 +386,8 @@ static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli) > { > dev_crit(chan2dev(&atchan->chan_common), > " desc: s%pad d%pad ctrl0x%x:0x%x l%pad\n", > - lli->saddr, lli->daddr, > - lli->ctrla, lli->ctrlb, lli->dscr); > + &lli->saddr, &lli->daddr, > + lli->ctrla, lli->ctrlb, &lli->dscr); > } > > > -- > 2.1.0.rc2 > > -- ~Vinod