Message ID | 545B8324.7010106@acm.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On Thu, Nov 06, 2014 at 03:18:12PM +0100, Bart Van Assche wrote: > 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=] Thanks. Given that this is a new warning in the patches I merged I'll add this one as well. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);
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.wu@intel.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com> --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)