Skip to contentSkip to conversation

zcache - trivial tweak to build-time error message wording

PATCH [email protected] 2 participants 2 messages Aug 31, 2011 – Sep 1, 2011 Staging

lore
Share & tools
lore
#0 lore raw

Clarify that the requirement is "at least one of" - the error message could potentially be read as both being required.

Yes, the line is over 80 chars. You can't get 79 chars of text and a #error into 80 chars :)

Patch against linux-next-20110831

drivers/staging/zcache/zcache-main.c renamed from drivers/staging/zcache/zcache-main.c.dist +1 -1
@@ -34,7 +34,7 @@
 #include "../zram/xvmalloc.h" /* if built in drivers/staging */
 
 #if (!defined(CONFIG_CLEANCACHE) && !defined(CONFIG_FRONTSWAP))
-#error "zcache is useless without CONFIG_CLEANCACHE or CONFIG_FRONTSWAP"
+#error "zcache is useless without at least one of CONFIG_CLEANCACHE or CONFIG_FRONTSWAP"
 #endif
 #ifdef CONFIG_CLEANCACHE
 #include <linux/cleancache.h>
#1 lore raw
Quoted 19 lines

From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 31, 2011 2:23 PM
To: Dan Magenheimer
Cc: [email protected]
Subject: zcache - trivial tweak to build-time error message wording

Clarify that the requirement is "at least one of" - the error message could potentially be read as both being required.

Yes, the line is over 80 chars. You can't get 79 chars of text and a #error into 80 chars :)

Patch against linux-next-20110831

drivers/staging/zcache/zcache-main.c line 37

Quoted 5 lines
drivers/staging/zcache/zcache-main.c renamed from drivers/staging/zcache/zcache-main.c.dist +1 -1
@@ -34,7 +34,7 @@
 #include "../zram/xvmalloc.h" /* if built in drivers/staging */
 
 #if (!defined(CONFIG_CLEANCACHE) && !defined(CONFIG_FRONTSWAP))
-#error "zcache is useless without CONFIG_CLEANCACHE or CONFIG_FRONTSWAP"
+#error "zcache is useless without at least one of CONFIG_CLEANCACHE or CONFIG_FRONTSWAP"

Actually, if the reader interprets that both are required, that's fine with me. Cleancache and frontswap were split up for upstreaming purposes but, except in unusual circumstances, should always be used together. That is difficult, of course, if frontswap is not yet merged in your build tree, but after frontswap is merged in Linus's tree, I might be inclined to require both CONFIG_CLEANCACHE *and* CONFIG_FRONTSWAP in the future Kconfig for zcache.