Re: [PATCH V3 for-next 1/4] IB/core: Introduce capabilitymask2 field in ClassPortInfo mad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/10/2016 07:56 AM, Erez Shitrit wrote:
>   drivers/infiniband/hw/qib/qib_mad.c   | 6 ++++--
>   drivers/infiniband/ulp/srpt/ib_srpt.c | 5 ++++-
>   include/rdma/ib_mad.h                 | 4 ++--
>   3 files changed, 10 insertions(+), 5 deletions(-)

This patch modifies ib_srpt but I'm not on the CC-list for this patch series?

diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c
index 0bd1837..c5d029d 100644
--- a/drivers/infiniband/hw/qib/qib_mad.c
+++ b/drivers/infiniband/hw/qib/qib_mad.c
@@ -1158,6 +1158,7 @@ static int pma_get_classportinfo(struct ib_pma_mad *pmp,
  	struct ib_class_port_info *p =
  		(struct ib_class_port_info *)pmp->data;
  	struct qib_devdata *dd = dd_from_ibdev(ibdev);
+	char *p_cap_mask2;

  	memset(pmp->data, 0, sizeof(pmp->data));

@@ -1172,11 +1173,12 @@ static int pma_get_classportinfo(struct ib_pma_mad *pmp,
  	 * Set the most significant bit of CM2 to indicate support for
  	 * congestion statistics
  	 */
-	p->reserved[0] = dd->psxmitwait_supported << 7;
+	p_cap_mask2 = (char *)&p->cap_mask2_resp_time;
+	p_cap_mask2[0] = dd->psxmitwait_supported << 7;

Casting __be32 * into char * will make the sparse endianness checks go crazy. Please introduce (inline) functions that allow to extract and set the cap_mask2 and resp_time fields. Please also verify whether the modified code builds cleanly with make C=2 CF=-D__CHECK_ENDIAN__.

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux