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

Commit d5e3f378 authored by Naresh Gottumukkala's avatar Naresh Gottumukkala Committed by Roland Dreier
Browse files

RDMA/ocrdma: Remove redundant check in ocrdma_build_fr()



Remove the redundant check of comparing if a 32-bit value is greater
than 0xffffffffULL.

Reported by Dan Carpenter.

Signed-off-by: default avatarNaresh Gottumukkala <bgottumukkala@emulex.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 1852d1da
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1981,9 +1981,7 @@ static int ocrdma_build_fr(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,

	wqe_size = roundup(wqe_size, OCRDMA_WQE_ALIGN_BYTES);

	if ((wr->wr.fast_reg.page_list_len >
		qp->dev->attr.max_pages_per_frmr) ||
		(wr->wr.fast_reg.length > 0xffffffffULL))
	if (wr->wr.fast_reg.page_list_len > qp->dev->attr.max_pages_per_frmr)
		return -EINVAL;

	hdr->cw |= (OCRDMA_FR_MR << OCRDMA_WQE_OPCODE_SHIFT);