mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm/dmapool: remove redundant DMAPOOL_DEBUG macro
@ 2026-05-22 10:53 lirongqing
  2026-05-22 11:19 ` Vlastimil Babka (SUSE)
  0 siblings, 1 reply; 3+ messages in thread
From: lirongqing @ 2026-05-22 10:53 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
	Liam R . Howlett, Vlastimil Babka, Mike Rapoport,
	Suren Baghdasaryan, Michal Hocko, linux-mm, linux-kernel
  Cc: Li RongQing

From: Li RongQing <lirongqing@baidu.com>

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 <lirongqing@baidu.com>
---
 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 <linux/types.h>
 #include <linux/wait.h>
 
-#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 device_attribute *attr, cha
 
 static DEVICE_ATTR_RO(pools);
 
-#ifdef DMAPOOL_DEBUG
+#ifdef CONFIG_SLUB_DEBUG_ON
 static void pool_check_block(struct dma_pool *pool, struct dma_block *block,
 			     gfp_t mem_flags)
 {
-- 
2.9.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-23  0:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-22 10:53 [PATCH] mm/dmapool: remove redundant DMAPOOL_DEBUG macro lirongqing
2026-05-22 11:19 ` Vlastimil Babka (SUSE)
2026-05-23  0:10   ` 答复: [外部邮件] " Li,Rongqing(ACG CCN)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®