From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from zimbra2.kalray.eu ([92.103.151.219]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyAnu-0008Af-Sh for barebox@lists.infradead.org; Wed, 22 Jul 2020 09:12:47 +0000 Date: Wed, 22 Jul 2020 11:12:35 +0200 From: Jules Maselbas Message-ID: <20200722091235.l6zwavdfsz7c5lh4@tellis.lin.mbt.kalray.eu> References: <20200721120600.15114-1-jmaselbas@kalray.eu> <20200721120600.15114-3-jmaselbas@kalray.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v3 02/14] usb: dwc2: Add host controller driver To: Ahmad Fatoum Cc: Barebox List On Wed, Jul 22, 2020 at 08:36:25AM +0200, Ahmad Fatoum wrote: > On 7/21/20 2:05 PM, Jules Maselbas wrote: > > +static int transfer_chunk(struct dwc2 *dwc2, u8 hc, > > + u8 *pid, int in, void *buffer, int num_packets, > > + int xfer_len, int *actual_len, int odd_frame) > > +{ > > + uint32_t hctsiz, hcchar, sub; > > + dma_addr_t dma_addr; > > + int ret = 0; > > + > > + dma_addr = dma_map_single(dwc2->dev, buffer, xfer_len, > > + in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); > > + > > + dwc2_dbg(dwc2, "chunk: pid=%d xfer_len=%u pkts=%u dma_addr=%llx\n", > > + *pid, xfer_len, num_packets, dma_addr); > > Use %da for printing dma_addr, otherwise on 32-bit builds with #define DEBUG, > garbage would be read here. Yup sounds good, from what i've seen in vsprintf.c it's '%ad' to print dma_addr_t. I will also modify gadget.c with the following: - dwc2_dbg(dwc2, "%s: 0x%p => 0x%08x\n", - __func__, (void *)ureq->dma, dma_reg); + dwc2_dbg(dwc2, "%s: 0x%ad => 0x%08x\n", + __func__, ureq->dma, dma_reg); _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox