mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] slab.c ifdef reduction breaks build
@ 2007-01-29 20:05 Jeff Dike
  2007-01-29 20:15 ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2007-01-29 20:05 UTC (permalink / raw)
  To: akpm, Christoph Lameter; +Cc: linux-kernel

optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-
no-config_zone_dma-is-set-reduce-config_zone_dma-ifdefs converts some
ifdefs into ifs.

One of them causes cs_dmacachep to be referenced, when that field
doesn't exist, because it's ifdefed on CONFIG_ZONE_DMA.

I'd suggest reverting that chunk.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
--
 mm/slab.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.18-mm/mm/slab.c
===================================================================
--- linux-2.6.18-mm.orig/mm/slab.c	2007-01-29 14:32:13.000000000 -0500
+++ linux-2.6.18-mm/mm/slab.c	2007-01-29 15:04:18.000000000 -0500
@@ -1492,14 +1492,15 @@ void __init kmem_cache_init(void)
 					ARCH_KMALLOC_FLAGS|SLAB_PANIC,
 					NULL, NULL);
 		}
-		if (CONFIG_ZONE_DMA_FLAG)
-			sizes->cs_dmacachep = kmem_cache_create(
+#if CONFIG_ZONE_DMA_FLAG
+		sizes->cs_dmacachep = kmem_cache_create(
 					names->name_dma,
 					sizes->cs_size,
 					ARCH_KMALLOC_MINALIGN,
 					ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA|
 						SLAB_PANIC,
 					NULL, NULL);
+#endif
 		sizes++;
 		names++;
 	}

-- 
Work email - jdike at linux dot intel dot com

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

end of thread, other threads:[~2007-01-30 19:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-29 20:05 [PATCH] slab.c ifdef reduction breaks build Jeff Dike
2007-01-29 20:15 ` Christoph Lameter
2007-01-29 20:41   ` Christoph Lameter
2007-01-29 20:56     ` Andrew Morton
2007-01-29 21:44       ` Christoph Lameter
2007-01-30 19:59         ` Christoph Lameter

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®