From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FB1933C53A; Fri, 9 Jan 2026 12:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767962626; cv=none; b=IjpbJsDBv1DpKmkDXI3pn//X9EHzs5jrBmwvfA6rRtJHnJ73QNNqtrdElYLrDWIwX0RR0oOfxH0V/dNLdzkFRa4A+Fe8tiXx+EDTalKe+Q937f6bU2j3WARROwG8uXUGfchP6CvexLBlAQX7k9UjGAerSr4FYIab2xzoVMspYOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767962626; c=relaxed/simple; bh=fPJ97FBYquqpOUTQ8Xvx7bbzZSPfP+rNoJPzBQY1VVM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jdFvEUeCAtU9iEzyQ45ldieCZPli7APSj7cmpzHqIjffXE6t3yXZJ2fyXvzc2A/lj1qNvc1ca8qgDWfOmYuA4Kj6yrNDb8nTLxMMLB1GfDvL9tA3sndjcxOSK0DWok2ARAioHbzmM/Y8dkA0B3H1nkIiJuc4yqi75KT66AM43lU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tM5AFm4T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tM5AFm4T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F0FDC16AAE; Fri, 9 Jan 2026 12:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767962626; bh=fPJ97FBYquqpOUTQ8Xvx7bbzZSPfP+rNoJPzBQY1VVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tM5AFm4T37uQB/2R4Z2GffeJQ/bbEEW1x+ZETB+CGqECT1l5vC4RH8l1B2lhRm3zF y7ImGqMRJ7GhzKoaO0sni0lbxMGegvMePsFFVeZOSP88E/ELohUYUyY4aMKLqxOCAR tZcyRVaqSpL3Ck9qqzqdtwHYHa/JzqPQ1iudhEKs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tom Sela , Yonatan Nachum , Michael Margolin , Gal Pressman , Jason Gunthorpe , Sasha Levin Subject: [PATCH 6.1 432/634] RDMA/efa: Remove possible negative shift Date: Fri, 9 Jan 2026 12:41:50 +0100 Message-ID: <20260109112133.798949521@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112117.407257400@linuxfoundation.org> References: <20260109112117.407257400@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Margolin [ Upstream commit 85463eb6a46caf2f1e0e1a6d0731f2f3bab17780 ] The page size used for device might in some cases be smaller than PAGE_SIZE what results in a negative shift when calculating the number of host pages in PAGE_SIZE for a debug log. Remove the debug line together with the calculation. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Link: https://patch.msgid.link/r/20251210173656.8180-1-mrgolin@amazon.com Reviewed-by: Tom Sela Reviewed-by: Yonatan Nachum Signed-off-by: Michael Margolin Reviewed-by: Gal Pressman Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/efa/efa_verbs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 90d5f1a96f3e..a22ddb2088f6 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -1214,13 +1214,9 @@ static int umem_to_page_list(struct efa_dev *dev, u32 hp_cnt, u8 hp_shift) { - u32 pages_in_hp = BIT(hp_shift - PAGE_SHIFT); struct ib_block_iter biter; unsigned int hp_idx = 0; - ibdev_dbg(&dev->ibdev, "hp_cnt[%u], pages_in_hp[%u]\n", - hp_cnt, pages_in_hp); - rdma_umem_for_each_dma_block(umem, &biter, BIT(hp_shift)) page_list[hp_idx++] = rdma_block_iter_dma_address(&biter); -- 2.51.0