Skip to contentSkip to conversation

rdma-cxgb4-remove-dead-null-checks-after-gfp_nofail-allocations.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Jul 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: RDMA/cxgb4: remove dead NULL checks after GFP_NOFAIL allocations
has been removed from the -mm tree. Its filename was
rdma-cxgb4-remove-dead-null-checks-after-gfp_nofail-allocations.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Gou Hao <[email protected]>
Subject: RDMA/cxgb4: remove dead NULL checks after GFP_NOFAIL allocations
Date: Fri, 24 Jul 2026 10:28:51 +0800

alloc_skb() with the __GFP_NOFAIL flag will never return NULL, so the subsequent NULL checks and error handling are unreachable dead code. Remove them.

Cc Bharat Potnuri <[email protected]>
Cc Cédric Le Goater <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc jiazhenyuan <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nam Cao <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Nilay Shroff <[email protected]>
Cc Shrikanth Hegde <[email protected]>
Cc Thomas Zimemrmann <[email protected]>
Cc Wentao Guan <[email protected]>

---

 drivers/infiniband/hw/cxgb4/mem.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/infiniband/hw/cxgb4/mem.c renamed from drivers/infiniband/hw/cxgb4/mem.c~rdma-cxgb4-remove-dead-null-checks-after-gfp_nofail-allocations +2 -8
@@ -74,11 +74,8 @@ static int _c4iw_write_mem_dma_aligned(s
 		c4iw_init_wr_wait(wr_waitp);
 	wr_len = roundup(sizeof(*req) + sizeof(*sgl), 16);
 
-	if (!skb) {
+	if (!skb)
 		skb = alloc_skb(wr_len, GFP_KERNEL | __GFP_NOFAIL);
-		if (!skb)
-			return -ENOMEM;
-	}
 	set_wr_txq(skb, CPL_PRIORITY_CONTROL, 0);
 
 	req = __skb_put_zero(skb, wr_len);
@@ -134,11 +131,8 @@ static int _c4iw_write_mem_inline(struct
 					 roundup(copy_len, T4_ULPTX_MIN_IO),
 				 16);
 
-		if (!skb) {
+		if (!skb)
 			skb = alloc_skb(wr_len, GFP_KERNEL | __GFP_NOFAIL);
-			if (!skb)
-				return -ENOMEM;
-		}
 		set_wr_txq(skb, CPL_PRIORITY_CONTROL, 0);
 
 		req = __skb_put_zero(skb, wr_len);

_

Patches currently in -mm which might be from [email protected] are

powerpc-xive-add-error-return-value-to-xive_smp_probe.patch drm-remove-dead-warn_on-null-check-after-gfp_nofail-allocation.patch lib-test_hmm-remove-dead-null-checks-after-gfp_nofail-allocations.patch