diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-03-19 00:25:26 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-03-23 05:07:04 +0400 |
commit | 3c32869f7afe40ff7372e5bb7cd3d8b4520711bb (patch) | |
tree | 4af3793eec037017e8dfd73ad82f8f877ba8f7f4 /drivers/infiniband/hw/ipath/ipath_verbs.c | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) | |
download | linux-3c32869f7afe40ff7372e5bb7cd3d8b4520711bb.tar.xz |
IB/ipath: Silence a static checker warning
I have a static checker which complains that 0x255 is too high for
the "dev->opstats[opcode]" array. It turns out that the hardware
has already validated the opcode at this point so it can't actually
overflow.
However, silencing the warning is good and this matches how the
opcode is treated in qib_ib_rcv() as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 439c35d4a669..ea93870266eb 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -620,7 +620,7 @@ void ipath_ib_rcv(struct ipath_ibdev *dev, void *rhdr, void *data, goto bail; } - opcode = be32_to_cpu(ohdr->bth[0]) >> 24; + opcode = (be32_to_cpu(ohdr->bth[0]) >> 24) & 0x7f; dev->opstats[opcode].n_bytes += tlen; dev->opstats[opcode].n_packets++; |