Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: mtu3: fix dma_addr_t printk output again

The support for 36-bit addresses originally came with an incorrect
printk format for dma addresses. Felipe changed the format string it
while applying, but the result was still incorrect, since we now have
to pass a pointer to the address instead of the integer value:

drivers/usb/mtu3/mtu3_qmu.c: In function 'mtu3_prepare_tx_gpd':
drivers/usb/mtu3/mtu3_qmu.c:261:25: error: format '%p' expects argument of type 'void *', but argument 7 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
drivers/usb/mtu3/mtu3_qmu.c: In function 'mtu3_prepare_rx_gpd':
drivers/usb/mtu3/mtu3_qmu.c:300:25: error: format '%p' expects argument of type 'void *', but argument 7 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]

This fixes the printk argument accordingly.

Fixes: 1a46dfea0841 ("usb: mtu3: support 36-bit DMA address")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
20ef800b 9506b146

+2 -2
+2 -2
drivers/usb/mtu3/mtu3_qmu.c
··· 259 259 enq = advance_enq_gpd(ring); 260 260 enq_dma = gpd_virt_to_dma(ring, enq); 261 261 dev_dbg(mep->mtu->dev, "TX-EP%d queue gpd=%p, enq=%p, qdma=%pad\n", 262 - mep->epnum, gpd, enq, enq_dma); 262 + mep->epnum, gpd, enq, &enq_dma); 263 263 264 264 enq->flag &= ~GPD_FLAGS_HWO; 265 265 gpd->next_gpd = cpu_to_le32(lower_32_bits(enq_dma)); ··· 298 298 enq = advance_enq_gpd(ring); 299 299 enq_dma = gpd_virt_to_dma(ring, enq); 300 300 dev_dbg(mep->mtu->dev, "RX-EP%d queue gpd=%p, enq=%p, qdma=%pad\n", 301 - mep->epnum, gpd, enq, enq_dma); 301 + mep->epnum, gpd, enq, &enq_dma); 302 302 303 303 enq->flag &= ~GPD_FLAGS_HWO; 304 304 gpd->next_gpd = cpu_to_le32(lower_32_bits(enq_dma));