From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: IB/rdmavt: Add create queue pair functionality
Date: Tue, 22 Mar 2016 23:01:32 +0300 [thread overview]
Message-ID: <20160322200132.GA27901@mwanda> (raw)
Hello Dennis Dalessandro,
The patch 515667f8f8b4: "IB/rdmavt: Add create queue pair
functionality" from Jan 22, 2016, leads to the following static
checker warning:
drivers/infiniband/sw/rdmavt/qp.c:835 rvt_create_qp()
warn: odd binop '0x4 & 0xe0'
drivers/infiniband/sw/rdmavt/qp.c
823 /*
824 * We have our QP and its good, now keep track of what types of opcodes
825 * can be processed on this QP. We do this by keeping track of what the
826 * 3 high order bits of the opcode are.
827 */
828 switch (init_attr->qp_type) {
829 case IB_QPT_SMI:
830 case IB_QPT_GSI:
831 case IB_QPT_UD:
832 qp->allowed_ops = IB_OPCODE_UD_SEND_ONLY & RVT_OPCODE_QP_MASK;
833 break;
834 case IB_QPT_RC:
835 qp->allowed_ops = IB_OPCODE_RC_SEND_ONLY & RVT_OPCODE_QP_MASK;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0x4 & 0xE0
is zero. I couldn't figure out where IB_OPCODE_RC_SEND_ONLY is
defined but presumably Smatch is correct that it's 4.
836 break;
837 case IB_QPT_UC:
838 qp->allowed_ops = IB_OPCODE_UC_SEND_ONLY & RVT_OPCODE_QP_MASK;
839 break;
840 default:
841 ret = ERR_PTR(-EINVAL);
842 goto bail_ip;
843 }
regards,
dan carpenter
--
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 reply other threads:[~2016-03-22 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 20:01 Dan Carpenter [this message]
2016-03-23 15:33 ` IB/rdmavt: Add create queue pair functionality Marciniszyn, Mike
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=20160322200132.GA27901@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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