Skip to contentSkip to conversation

RDMA/nes: silence compiler warning

PATCH In review Dan Carpenter 3 participants 7 messages Oct 17, 2011 – Oct 18, 2011 5 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/nes: silence compiler warning

drivers/infiniband/hw/nes/nes_cm.c:3190:2: warning: format ‘%zu’
expects argument of type ‘size_t’, but argument 11 has type ‘int’ [-Wformat]

The warning says the type is "int" but actually it's unsigned short.

drivers/infiniband/hw/nes/nes_cm.c +1 -1
index 16667c7..b96ec43 100644
@@ -3189,7 +3189,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
 	nes_debug(NES_DBG_CM, "QP%u, Destination IP = 0x%08X:0x%04X, local = "
 		  "0x%08X:0x%04X, rcv_nxt=0x%08X, snd_nxt=0x%08X, mpa + "
-		  "private data length=%zu.\n", nesqp->hwqp.qp_id,
+		  "private data length=%d.\n", nesqp->hwqp.qp_id,
 		  ntohl(cm_id->remote_addr.sin_addr.s_addr),
 		  ntohs(cm_id->remote_addr.sin_port),
 		  ntohl(cm_id->local_addr.sin_addr.s_addr),
#2 lore raw
In reply to a message not in the archive

RGFuIENhcnBlbnRlciBXcm90ZToNCg0KPiBTaWduZWQtb2ZmLWJ5OiBEYW4gQ2FycGVudGVyIDxk YW4uY2FycGVudGVyQG9yYWNsZS5jb20+DQo+IA0KPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9pbmZp bmliYW5kL2h3L25lcy9uZXNfY20uYw0KPiBiL2RyaXZlcnMvaW5maW5pYmFuZC9ody9uZXMvbmVz X2NtLmMNCj4gaW5kZXggMTY2NjdjNy4uYjk2ZWM0MyAxMDA2NDQNCj4gLS0tIGEvZHJpdmVycy9p bmZpbmliYW5kL2h3L25lcy9uZXNfY20uYw0KPiArKysgYi9kcml2ZXJzL2luZmluaWJhbmQvaHcv bmVzL25lc19jbS5jDQo+IEBAIC0zMTg5LDcgKzMxODksNyBAQCBpbnQgbmVzX2FjY2VwdChzdHJ1 Y3QgaXdfY21faWQgKmNtX2lkLCBzdHJ1Y3QNCj4gaXdfY21fY29ubl9wYXJhbSAqY29ubl9wYXJh bSkNCj4gDQo+ICAJbmVzX2RlYnVnKE5FU19EQkdfQ00sICJRUCV1LCBEZXN0aW5hdGlvbiBJUCA9 IDB4JTA4WDoweCUwNFgsDQo+IGxvY2FsID0gIg0KPiAgCQkgICIweCUwOFg6MHglMDRYLCByY3Zf bnh0PTB4JTA4WCwgc25kX254dD0weCUwOFgsIG1wYSArICINCj4gLQkJICAicHJpdmF0ZSBkYXRh IGxlbmd0aD0lenUuXG4iLCBuZXNxcC0+aHdxcC5xcF9pZCwNCj4gKwkJICAicHJpdmF0ZSBkYXRh IGxlbmd0aD0lZC5cbiIsIG5lc3FwLT5od3FwLnFwX2lkLA0KPiAgCQkgIG50b2hsKGNtX2lkLT5y ZW1vdGVfYWRkci5zaW5fYWRkci5zX2FkZHIpLA0KPiAgCQkgIG50b2hzKGNtX2lkLT5yZW1vdGVf YWRkci5zaW5fcG9ydCksDQo+ICAJCSAgbnRvaGwoY21faWQtPmxvY2FsX2FkZHIuc2luX2FkZHIu c19hZGRyKSwNCg0KQWNrZWQtYnk6IEZhaXNhbCBMYXRpZiA8ZmFpc2FsLmxhdGlmQGludGVsLmNv bT4NCg0K

#5 lore raw
In reply to a message not in the archive
Quoted 7 lines · Dan Carpenter

       nes_debug(NES_DBG_CM, "QP%u, Destination IP = 0x%08X:0x%04X, local = " "0x%08X:0x%04X, rcv_nxt=0x%08X, snd_nxt=0x%08X, mpa + "
-                 "private data length=%zu.\n", nesqp->hwqp.qp_id,
+                 "private data length=%d.\n", nesqp->hwqp.qp_id, ntohl(cm_id->remote_addr.sin_addr.s_addr), ntohs(cm_id->remote_addr.sin_port), ntohl(cm_id->local_addr.sin_addr.s_addr),

By the way, could this debug message be using %pI4 instead of %08X to print IP addresses?

- R.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
In reply to a message not in the archive
Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Roland Dreier
Sent: Monday, October 17, 2011 1:15 PM
To: Dan Carpenter
Cc: Latif, Faisal; Hefty, Sean; Hal Rosenstock; linux- [email protected]; [email protected]
Subject: Re: [patch] RDMA/nes: silence compiler warning

Quoted 1 line · Dan Carpenter

       nes_debug(NES_DBG_CM, "QP%u, Destination IP = 0x%08X:0x%04X,

local = "

Quoted 1 line

                 "0x%08X:0x%04X, rcv_nxt=0x%08X, snd_nxt=0x%08X, mpa

+ "

Quoted 5 lines

-                 "private data length=%zu.\n", nesqp->hwqp.qp_id,
+                 "private data length=%d.\n", nesqp->hwqp.qp_id, ntohl(cm_id->remote_addr.sin_addr.s_addr), ntohs(cm_id->remote_addr.sin_port), ntohl(cm_id->local_addr.sin_addr.s_addr),

Quoted 4 lines

By the way, could this debug message be using %pI4 instead of %08X to print IP addresses?

- R.

Yes, We should have used %pI4 for this also.

Thanks
Faisal

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Roland Dreier
Sent: Tuesday, October 18, 2011 12:11 PM
To: Latif, Faisal
Cc: Dan Carpenter; Hefty, Sean; Hal Rosenstock; linux- [email protected]; [email protected]
Subject: Re: [patch] RDMA/nes: silence compiler warning

Quoted 8 lines
Quoted 1 line · Faisal

Yes, We should have used %pI4 for this also.

Any chance of you guys going through and converting IP printing to %pI4 in the whole driver?

- R.

I will get patch out to you to convert the IP printing. Thanks for pointing it out.

Faisal