]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: xilinx: Fix harmless format string warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 13 Jan 2015 14:20:05 +0000 (15:20 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 Jan 2015 21:35:40 +0000 (15:35 -0600)
commit8dbb544ad91945dfd87dde39cbfdcbaa380889ec
treede842a71b71ab8a00c64eaf2c3f84b95944ea4cc
parentbfa6fa2a2dfa997f6c80e35808e50464ecfebcda
PCI: xilinx: Fix harmless format string warning

The xilinx PCIe driver prints a register value whose type is propagated to
the type returned by the GENMASK() macro.  Unfortunately, that type has
recently changed as the result of a bug fix, so now we get a warning about
the type:

  drivers/pci/host/pcie-xilinx.c: In function 'xilinx_pcie_clear_err_interrupts':
  drivers/pci/host/pcie-xilinx.c:154:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]

Change the code so we always print the number as an 'unsigned long' type to
avoid the warning.  The original code was fine on 32-bit architectures but
not on 64-bit.  Now it works as expected on both.

Fixes: e3a6bf67f46 ("bitops: Fix shift overflow in GENMASK macros")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
drivers/pci/host/pcie-xilinx.c