Thread (2 messages) read the whole thread 2 messages, 2 authors, 2016-02-01

[PATCH] infiniband: cxgb4: use %pR format string for printing resources

From: Steve Wise <hidden>
Date: 2016-02-01 16:45:06
Also in: linux-rdma, lkml

Subject: [PATCH] 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>
---
This is an old warning I see rarely on ARM randconfig builds.

Acked-by: Steve Wise <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help