From nobody Sun May 24 18:42:56 2026 Received: from outbound.baidu.com (mx15.baidu.com [111.202.115.100]) by smtp.subspace.kernel.org (Postfix) with SMTP id B5745823DD for ; Fri, 22 May 2026 10:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.202.115.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779447253; cv=none; b=i5NXkW1H/hcroIzLV/ErsUlt3n1H76es/TPpQOJJZZFmCMv86HVLMhStAdz3rKdNRjYI1vmBNGB5HabLNE7pERbCUQ2jo/dje5xahB0fmtLB+ClYUxyBpTkW8E7vSxUy4uJE3XDnl9OoAf/6SPKDjJ68TCoAFQ3TRcXi2BVB9OI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779447253; c=relaxed/simple; bh=3uRHe33dolhWRs1C8FTmj9/qsUnD4hN8n28Ph3cr4b4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=iQuf+RqhlLNglO0MszGVEI1hfuCDs4S7nJrgCe6csUhcaL+dib00X46EifB2ee/exEwHbMEek8INILMUKFooF0xGi6tGQDIt85rGoLg9WZ3QQdHbUChHProPWfh2ml7jXsK2iVk8T0nI+9l/MQhP+Aan4daSWGo8sAmP6dEZaXc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b=gZxGe9tk; arc=none smtp.client-ip=111.202.115.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b="gZxGe9tk" X-MD-Sfrom: lirongqing@baidu.com X-MD-SrcIP: 172.31.50.47 From: lirongqing To: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , , CC: Li RongQing Subject: [PATCH] mm/dmapool: remove redundant DMAPOOL_DEBUG macro Date: Fri, 22 May 2026 06:53:46 -0400 Message-ID: <20260522105346.2215-1-lirongqing@baidu.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: bjkjy-exc5.internal.baidu.com (172.31.50.49) To bjkjy-exc3.internal.baidu.com (172.31.50.47) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baidu.com; s=selector1; t=1779447237; bh=mf8dxdNkgCdt+eOuEBketESSqX3ALKUBloGqvBAcTyI=; h=From:To:CC:Subject:Date:Message-ID:Content-Type; b=gZxGe9tkJvLCEj6oStLJq5hWzXg41aJbnRg48KiGCRog0C+/5za7YPkCTY3PT+U5k ZA39eAx3UrwTd0Mp8nwUhhzCkLeMrKwndmHFUNACnNhqFI98QRNG5SDhl1YU8suAwd cp+2nlKsLR0AqLlX51CyOAdymp9DzpMZ2k9/SU5SDLymegCW0X54nhpjKxPG6jOj2l tneg6NW/mV6P1SA+InqCUo4MCTg5WIF+X0jY/6dem7Fzq/4ljD8LMdIEFMcBZ717M+ TFiG6KL9NPCu4DT1Fz4kfa0ymYqUyUMkZfQ/lS5bSEJmvtLQ4uormvYzSqeTk3O22H +X8lLOtv+NTeg== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Li RongQing The DMAPOOL_DEBUG macro is only defined when CONFIG_SLUB_DEBUG_ON is enabled, and it is used exclusively to guard the pool_check_block() function. Wrapping CONFIG_SLUB_DEBUG_ON in another local macro adds unnecessary indirection. Simplify the code by removing DMAPOOL_DEBUG entirely and using the standard CONFIG_SLUB_DEBUG_ON config option directly. Signed-off-by: Li RongQing --- mm/dmapool.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index 5d8af6e..af43f1a 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -36,10 +36,6 @@ #include #include =20 -#ifdef CONFIG_SLUB_DEBUG_ON -#define DMAPOOL_DEBUG 1 -#endif - struct dma_block { struct dma_block *next_block; dma_addr_t dma; @@ -92,7 +88,7 @@ static ssize_t pools_show(struct device *dev, struct devi= ce_attribute *attr, cha =20 static DEVICE_ATTR_RO(pools); =20 -#ifdef DMAPOOL_DEBUG +#ifdef CONFIG_SLUB_DEBUG_ON static void pool_check_block(struct dma_pool *pool, struct dma_block *bloc= k, gfp_t mem_flags) { --=20 2.9.4