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 -#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