Skip to content

Commit fdb1117

Browse files
committed
ARM: dma-mapping: fix debug messages in dmabounce code
This patch fixes the usage of uninitialized variables in dmabounce code intoduced by commit a227fb9 ('ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops'): arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_device’: arch/arm/common/dmabounce.c:409: warning: ‘off’ may be used uninitialized in this function arch/arm/common/dmabounce.c:407: note: ‘off’ was declared here arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_cpu’: arch/arm/common/dmabounce.c:369: warning: ‘off’ may be used uninitialized in this function arch/arm/common/dmabounce.c:367: note: ‘off’ was declared here Signed-off-by: Marek Szyprowski <[email protected]>
1 parent 4986e5c commit fdb1117

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/arm/common/dmabounce.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ static int __dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
366366
struct safe_buffer *buf;
367367
unsigned long off;
368368

369-
dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
370-
__func__, addr, off, sz, dir);
369+
dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n",
370+
__func__, addr, sz, dir);
371371

372372
buf = find_safe_buffer_dev(dev, addr, __func__);
373373
if (!buf)
@@ -377,8 +377,8 @@ static int __dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
377377

378378
BUG_ON(buf->direction != dir);
379379

380-
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
381-
__func__, buf->ptr, virt_to_dma(dev, buf->ptr),
380+
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n",
381+
__func__, buf->ptr, virt_to_dma(dev, buf->ptr), off,
382382
buf->safe, buf->safe_dma_addr);
383383

384384
DO_STATS(dev->archdata.dmabounce->bounce_count++);
@@ -406,8 +406,8 @@ static int __dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
406406
struct safe_buffer *buf;
407407
unsigned long off;
408408

409-
dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
410-
__func__, addr, off, sz, dir);
409+
dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n",
410+
__func__, addr, sz, dir);
411411

412412
buf = find_safe_buffer_dev(dev, addr, __func__);
413413
if (!buf)
@@ -417,8 +417,8 @@ static int __dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
417417

418418
BUG_ON(buf->direction != dir);
419419

420-
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
421-
__func__, buf->ptr, virt_to_dma(dev, buf->ptr),
420+
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n",
421+
__func__, buf->ptr, virt_to_dma(dev, buf->ptr), off,
422422
buf->safe, buf->safe_dma_addr);
423423

424424
DO_STATS(dev->archdata.dmabounce->bounce_count++);

0 commit comments

Comments
 (0)