From: Arnd Bergmann <arnd@arndb.de>
To: George Spelvin <linux@sciencehorizons.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation
Date: Wed, 10 Aug 2016 23:54:15 +0200 [thread overview]
Message-ID: <20160810215424.1926658-10-arnd@arndb.de> (raw)
In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de>
From: George Spelvin <linux@sciencehorizons.net>
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Some versions of gcc don't like tests for the value of an undefined
> preprocessor symbol, even in the #else branch of an #ifndef:
Damn, I had hoped that would work universally; I tried to avoid the
uglier #if-inside-#ifdef construction. GCC 6 is quite happy wth it.
But no objections.
If you want:
Acked-by: George Spelvin <linux@sciencehorizons.net>
But here's an alternative. Geert, what do you think of this?
Acked-by: George Spelvin <linux@sciencehorizons.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/test_hash.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/test_hash.c b/lib/test_hash.c
index 81702ee4c41c..ddd819fec343 100644
--- a/lib/test_hash.c
+++ b/lib/test_hash.c
@@ -221,17 +221,17 @@ test_hash_init(void)
/* Issue notices about skipped tests. */
#ifndef HAVE_ARCH__HASH_32
pr_info("__hash_32() has no arch implementation to test.");
-#elif HAVE_ARCH__HASH_32 != 1
+#elif HAVE_ARCH__HASH_32 + 0 != 1
pr_info("__hash_32() is arch-specific; not compared to generic.");
#endif
#ifndef HAVE_ARCH_HASH_32
pr_info("hash_32() has no arch implementation to test.");
-#elif HAVE_ARCH_HASH_32 != 1
+#elif HAVE_ARCH_HASH_32 + 0 != 1
pr_info("hash_32() is arch-specific; not compared to generic.");
#endif
#ifndef HAVE_ARCH_HASH_64
pr_info("hash_64() has no arch implementation to test.");
-#elif HAVE_ARCH_HASH_64 != 1
+#elif HAVE_ARCH_HASH_64 + 0 != 1
pr_info("hash_64() is arch-specific; not compared to generic.");
#endif
--
2.9.0
next prev parent reply other threads:[~2016-08-10 21:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 21:54 [PATCH 0/9] v4.8 build regressions Arnd Bergmann
2016-08-10 21:54 ` [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
2016-08-11 8:43 ` Masahiro Yamada
2016-08-11 8:59 ` Ingo Molnar
2016-08-10 21:54 ` [PATCH 2/9] dsa: mv88e6xxx: hide unused functions Arnd Bergmann
2016-08-13 0:32 ` David Miller
2016-08-10 21:54 ` [PATCH 3/9] drm/mediatek: add COMMON_CLK dependency Arnd Bergmann
2016-08-10 21:54 ` [PATCH 4/9] drm/mediatek: add CONFIG_OF dependency Arnd Bergmann
2016-08-10 21:54 ` [PATCH 5/9] drm/mediatek: add ARM_SMCCC dependency Arnd Bergmann
2016-08-10 21:54 ` [PATCH 6/9] clocksource: kona: fix get_counter error handling Arnd Bergmann
2016-08-11 0:00 ` Ray Jui
2016-08-16 13:11 ` Daniel Lezcano
2016-08-10 21:54 ` [PATCH 7/9] 8250/fintek: rename IRQ_MODE macro Arnd Bergmann
2016-08-10 21:54 ` [PATCH 8/9] test/hash: Fix warning in two-dimensional array init Arnd Bergmann
2016-08-10 21:54 ` Arnd Bergmann [this message]
2016-08-10 22:45 ` [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann
2016-08-11 6:38 ` [PATCH 0/9] v4.8 build regressions Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160810215424.1926658-10-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@sciencehorizons.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome