Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965289AbbLHQEP (ORCPT ); Tue, 8 Dec 2015 11:04:15 -0500 Received: from eusmtp01.atmel.com ([212.144.249.243]:19383 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965249AbbLHQEK (ORCPT ); Tue, 8 Dec 2015 11:04:10 -0500 Subject: Re: [PATCH] dmaengine: at_hdmac: fix dma_addr_t printing To: Arnd Bergmann , Vinod Koul References: <24590899.3e2244jrdI@wuerfel> CC: "Dmitry V. Krivenok" , , , "Dan Williams" , From: Nicolas Ferre Organization: atmel Message-ID: <5666FF8F.3040005@atmel.com> Date: Tue, 8 Dec 2015 17:04:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <24590899.3e2244jrdI@wuerfel> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 47 Le 08/12/2015 16:34, Arnd Bergmann a ?crit : > 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. > > Signed-off-by: Arnd Bergmann > Fixes: 096117032a36 ("dmaengine: do not use 0x in front of %pad") Yep, thanks Arnd! Acked-by: Nicolas Ferre > --- > 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); > } > > > -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/