diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-12 19:20:08 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-13 01:00:58 -0400 |
commit | a8f731ebd1b4f94cf52ff07fe524414b4fbf9793 (patch) | |
tree | 498e7cb58342c2c4fc6705b033855f68313afa6d | |
parent | 64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91 (diff) |
IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0]
Acked-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index bbbcf389272c..416cb7244224 100644 --- 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, | |||
2501 | spin_lock_irqsave(&qp->sq.lock, flags); | 2501 | spin_lock_irqsave(&qp->sq.lock, flags); |
2502 | 2502 | ||
2503 | for (nreq = 0; wr; nreq++, wr = wr->next) { | 2503 | for (nreq = 0; wr; nreq++, wr = wr->next) { |
2504 | if (unlikely(wr->opcode >= sizeof(mlx5_ib_opcode) / sizeof(mlx5_ib_opcode[0]))) { | 2504 | if (unlikely(wr->opcode >= ARRAY_SIZE(mlx5_ib_opcode))) { |
2505 | mlx5_ib_warn(dev, "\n"); | 2505 | mlx5_ib_warn(dev, "\n"); |
2506 | err = -EINVAL; | 2506 | err = -EINVAL; |
2507 | *bad_wr = wr; | 2507 | *bad_wr = wr; |