projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64aa90f
)
IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0]
author
Fabian Frederick
<
[email protected]
>
Tue, 12 Aug 2014 23:20:08 +0000
(19:20 -0400)
committer
Roland Dreier
<
[email protected]
>
Wed, 13 Aug 2014 05:00:58 +0000
(22:00 -0700)
Acked-by: Eli Cohen <
[email protected]
>
Signed-off-by: Fabian Frederick <
[email protected]
>
Signed-off-by: Doug Ledford <
[email protected]
>
Signed-off-by: Roland Dreier <
[email protected]
>
drivers/infiniband/hw/mlx5/qp.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/qp.c
b/drivers/infiniband/hw/mlx5/qp.c
index bbbcf389272cbde11ee754d3efacae0d3c700190..416cb7244224750777fa611f43bf4934731cac98 100644
(file)
--- a/
drivers/infiniband/hw/mlx5/qp.c
+++ b/
drivers/infiniband/hw/mlx5/qp.c
@@
-2501,7
+2501,7
@@
int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
spin_lock_irqsave(&qp->sq.lock, flags);
for (nreq = 0; wr; nreq++, wr = wr->next) {
- if (unlikely(wr->opcode >=
sizeof(mlx5_ib_opcode) / sizeof(mlx5_ib_opcode[0]
))) {
+ if (unlikely(wr->opcode >=
ARRAY_SIZE(mlx5_ib_opcode
))) {
mlx5_ib_warn(dev, "\n");
err = -EINVAL;
*bad_wr = wr;