diff mbox

[1/5] opensm/include/iba/ib_types.h: Fix shadow declaration warnings

Message ID 1391425516-14462-1-git-send-email-alexne@mellanox.com (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Alex Netes Feb. 3, 2014, 11:05 a.m. UTC
Calling cl_ntoh32(cl_ntoh32()) causes shadow parameters redefinition.
The fix is to split the cl_ntoh32() calls.

Signed-off-by: Alex Netes <alexne@mellanox.com>
---
 include/iba/ib_types.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Hal Rosenstock Feb. 3, 2014, 7:42 p.m. UTC | #1
On 2/3/2014 6:05 AM, Alex Netes wrote:
> Calling cl_ntoh32(cl_ntoh32()) causes shadow parameters redefinition.
> The fix is to split the cl_ntoh32() calls.
> 
> Signed-off-by: Alex Netes <alexne@mellanox.com>

Thanks. Applied.

-- Hal
--
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 mbox

Patch

diff --git a/include/iba/ib_types.h b/include/iba/ib_types.h
index 86fa07b..a5136d4 100644
--- a/include/iba/ib_types.h
+++ b/include/iba/ib_types.h
@@ -8164,9 +8164,10 @@  static inline void OSM_API
 ib_inform_info_set_qpn(IN ib_inform_info_t * p_ii, IN ib_net32_t const qpn)
 {
 	uint32_t tmp = cl_ntoh32(p_ii->g_or_v.generic.qpn_resp_time_val);
+	uint32_t qpn_h = cl_ntoh32(qpn);
 
 	p_ii->g_or_v.generic.qpn_resp_time_val =
-	    cl_hton32((tmp & 0x000000ff) | ((cl_ntoh32(qpn) << 8) & 0xffffff00)
+	    cl_hton32((tmp & 0x000000ff) | ((qpn_h << 8) & 0xffffff00)
 	    );
 }