[patch] MTD: fix cfi_interleave() build errors

From: Ingo Molnar
Date: Mon Oct 01 2007 - 01:02:08 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> FYI, the attached .config fails with the build errors below. Kernel is
> latest 2.6.23-git. Found via make randconfig.

the quick fix below resolves these build failures. (i guess it might be
cleaner/safer to solve this via excluding this .config combination via
Kconfig rules, but that looks too involved for now.)

Ingo

---------------->
Subject: MTD: fix cfi_interleave() build errors
From: Ingo Molnar <mingo@xxxxxxx>

if the .config specifies no cfi_interleave() then generate a
run-time bug. This makes 'make randconfig' build tests work again.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
include/linux/mtd/cfi.h | 4 ++++
1 file changed, 4 insertions(+)

Index: linux/include/linux/mtd/cfi.h
===================================================================
--- linux.orig/include/linux/mtd/cfi.h
+++ linux/include/linux/mtd/cfi.h
@@ -57,6 +57,10 @@
#define cfi_interleave_is_8(cfi) (0)
#endif

+#ifndef cfi_interleave
+# define cfi_interleave(cfi) ({ BUG_ON(1); 0; })
+#endif
+
static inline int cfi_interleave_supported(int i)
{
switch (i) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/