public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] IB/mthca: make type explicit in mthca_INIT_HCA()
@ 2013-08-16  7:19 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-08-16  7:19 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

The type of the second argument to the MTHCA_PUT() macro determines how
many bytes will be written to inbox.  Judging from the context, the
current code is doing the right thing by writing an int of data.  But I
would feel more comfortable making it explicit that we are writing 32
bits.

This is just a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index 9d3e5c1..2d2a401 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -1359,7 +1359,7 @@ int mthca_INIT_HCA(struct mthca_dev *dev,
 	memset(inbox, 0, INIT_HCA_IN_SIZE);
 
 	if (dev->mthca_flags & MTHCA_FLAG_SINAI_OPT)
-		MTHCA_PUT(inbox, 0x1, INIT_HCA_FLAGS1_OFFSET);
+		MTHCA_PUT(inbox, (u32)0x1, INIT_HCA_FLAGS1_OFFSET);
 
 #if defined(__LITTLE_ENDIAN)
 	*(inbox + INIT_HCA_FLAGS2_OFFSET / 4) &= ~cpu_to_be32(1 << 1);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-16  7:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16  7:19 [patch] IB/mthca: make type explicit in mthca_INIT_HCA() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox