mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0]
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]>
This commit is contained in:
parent
64aa90f26c
commit
a8f731ebd1
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue