linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V3 for-next 1/4] IB/core: Introduce capabilitymask2 field in ClassPortInfo mad
Date: Tue, 10 May 2016 08:38:32 -0700	[thread overview]
Message-ID: <57320078.9060608@sandisk.com> (raw)
In-Reply-To: <1462892208-6140-2-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-05-10 15:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 14:56 [PATCH V3 for-next 0/4] Support SendOnlyFullMember join Erez Shitrit
     [not found] ` <1462892208-6140-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-10 14:56   ` [PATCH V3 for-next 1/4] IB/core: Introduce capabilitymask2 field in ClassPortInfo mad Erez Shitrit
     [not found]     ` <1462892208-6140-2-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-10 15:38       ` Bart Van Assche [this message]
     [not found]         ` <57320078.9060608-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-05-10 15:45           ` Erez Shitrit
2016-05-13 15:23           ` ira.weiny
     [not found]             ` <20160513152335.GA599-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-15  6:12               ` Erez Shitrit
2016-05-10 14:56   ` [PATCH V3 for-next 2/4] IB/SA Agent: Add support for SA agent get ClassPortInfo Erez Shitrit
2016-05-10 14:56   ` [PATCH V3 for-next 3/4] IB/core: Support new type of join-state for multicast Erez Shitrit
     [not found]     ` <1462892208-6140-4-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-10 15:37       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.20.1605101036590.27121-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2016-05-10 15:43           ` Erez Shitrit
2016-05-10 14:56   ` [PATCH V3 for-next 4/4] IB/ipoib: Support SendOnlyFullMember MCG for SendOnly join Erez Shitrit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57320078.9060608@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).