]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390: pci: don't print uninitialized data for debugging
authorArnd Bergmann <arnd@arndb.de>
Thu, 10 Nov 2016 16:44:48 +0000 (17:44 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Nov 2016 16:45:08 +0000 (08:45 -0800)
commit92dfffee974f75c28b0c89f31318669091de1ec3
treeaf05e2169fc95c6560ccb3e13148d183e7c99dff
parent069013a9e2bbf1ace3f796cb664023dcd40730f7
s390: pci: don't print uninitialized data for debugging

gcc correctly warns about an incorrect use of the 'pa' variable in case
we pass an empty scatterlist to __s390_dma_map_sg:

  arch/s390/pci/pci_dma.c: In function '__s390_dma_map_sg':
  arch/s390/pci/pci_dma.c:309:13: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized]

This adds a bogus initialization to the function to sanitize the debug
output.  I would have preferred a solution without the initialization,
but I only got the report from the kbuild bot after turning on the
warning again, and didn't manage to reproduce it myself.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/s390/pci/pci_dma.c