]> git.baikalelectronics.ru Git - kernel.git/commit
infiniband: cxgb4: use %pR format string for printing resources
authorArnd Bergmann <arnd@arndb.de>
Mon, 1 Feb 2016 16:42:02 +0000 (17:42 +0100)
committerDoug Ledford <dledford@redhat.com>
Mon, 29 Feb 2016 22:10:15 +0000 (17:10 -0500)
commit58fc68544795d84148311f63e76132f0346d8e98
tree1a06d68ee00e30683b56fd3590a9423337494f03
parent6c34249fe073b56549548c9c23c71d58013db801
infiniband: cxgb4: use %pR format string for printing resources

The cxgb4 prints an MMIO resource using the "0x%x" and "%p" format
strings on the length and start, respective, but that
triggers a compiler warning when using a 64-bit resource_size_t
on a 32-bit architecture:

drivers/infiniband/hw/cxgb4/device.c: In function 'c4iw_rdev_open':
drivers/infiniband/hw/cxgb4/device.c:807:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       (void *)pci_resource_start(rdev->lldi.pdev, 2),

This changes the format string to use %pR instead, which pretty-prints
the resource, avoids the warning and is shorter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/device.c