Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8f731eb authored by Fabian Frederick's avatar Fabian Frederick Committed by Roland Dreier
Browse files

IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0]

parent 64aa90f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;