The result of a pointer subtraction has type ptrdiff_t. Hence change a
%ld format specifier into %td. This change avoids that the following
warning is printed on 32-bit systems:

warning: format '%ld' expects argument of type 'long int', but argument 5 has 
type 'int' [-Wformat=]

Reported-by: Wu Fengguang <fengguang...@intel.com>
Signed-off-by: Bart Van Assche <bvanass...@acm.org>
Cc: Sagi Grimberg <sa...@mellanox.com>
Cc: Sebastian Parschauer <sebastian.rie...@profitbricks.com>
---
 drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c 
b/drivers/infiniband/ulp/srp/ib_srp.c
index 89e4560..577eb01 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1747,7 +1747,7 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, 
struct srp_rsp *rsp)
                }
                if (!scmnd) {
                        shost_printk(KERN_ERR, target->scsi_host,
-                                    "Null scmnd for RSP w/tag %#016llx 
received on ch %ld / QP %#x\n",
+                                    "Null scmnd for RSP w/tag %#016llx 
received on ch %td / QP %#x\n",
                                     rsp->tag, ch - target->ch, ch->qp->qp_num);
 
                        spin_lock_irqsave(&ch->lock, flags);
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to