From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Steve Wise
<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
RDMA mailing list
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Endianess in cxgb4
Date: Tue, 24 Oct 2017 12:55:06 -0600 [thread overview]
Message-ID: <20171024185506.GE1806@obsidianresearch.com> (raw)
In-Reply-To: <20171024183759.GK16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
On Tue, Oct 24, 2017 at 09:37:59PM +0300, Leon Romanovsky wrote:
> Hi Steve,
>
> I reviewed my reports from various static checkers and saw strange code
> in build_tpte_memreg() function that in drivers/infiniband/hw/cxgb4/qp.c.
>
> That function has following code:
> 614 fr->r2 = cpu_to_be32(0);
> 615 fr->stag = cpu_to_be32(mhp->ibmr.rkey);
>
> The r2, stag and rkey are u32, why do you need cpu_to_be32() conversion?
>
> The error report which I got is:
>
> 134 drivers/infiniband/hw/cxgb4/qp.c:614:16: warning: incorrect type in assignment (different base types)
> 135 drivers/infiniband/hw/cxgb4/qp.c:614:16: expected unsigned int [unsigned] [usertype] r2
> 136 drivers/infiniband/hw/cxgb4/qp.c:614:16: got restricted __be32 [usertype] <noident>
> 137 drivers/infiniband/hw/cxgb4/qp.c:615:18: warning: incorrect type in assignment (different base types)
> 138 drivers/infiniband/hw/cxgb4/qp.c:615:18: expected unsigned int [unsigned] [usertype] stag
> 139 drivers/infiniband/hw/cxgb4/qp.c:615:18: got restricted __be32 [usertype] <noident>
I looked at cxgb in userspace and gave up. It seemed to be storing be
and host values in the same memory locations :(
Jason
--
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
next prev parent reply other threads:[~2017-10-24 18:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 18:37 Endianess in cxgb4 Leon Romanovsky
[not found] ` <20171024183759.GK16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-24 18:45 ` Steve Wise
2017-10-24 19:01 ` Leon Romanovsky
[not found] ` <20171024190142.GM16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-25 14:48 ` Steve Wise
2017-10-25 15:38 ` Leon Romanovsky
[not found] ` <20171025153856.GT16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-25 15:46 ` Steve Wise
2017-10-24 18:55 ` Jason Gunthorpe [this message]
[not found] ` <20171024185506.GE1806-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-24 19:31 ` Steve Wise
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=20171024185506.GE1806@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.