From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933531AbcHJV6x (ORCPT ); Wed, 10 Aug 2016 17:58:53 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:57906 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933372AbcHJV6v (ORCPT ); Wed, 10 Aug 2016 17:58:51 -0400 From: Arnd Bergmann To: George Spelvin Cc: Arnd Bergmann , Geert Uytterhoeven , 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 Message-Id: <20160810215424.1926658-10-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:pBgxRtg4svRZLhpgdzN6sEtwNAGg2i9Z2R8at2kMolMVNdY2/dj MG7L4I45twGiD0SRWiaKIEXMy7XmvMxBP1kkjQWR+OOmiZ6AYUn+QkCPqUZP1zqMHCMHMrp dSXAfeIjrI9jvcK1HXmcKyH8f7deBFLFEt+PmarOnjUwgC7fkDPZaONMdb0iZcOgFLbhSF7 AzgiKup6L90Ibt29AMCWg== X-UI-Out-Filterresults: notjunk:1;V01:K0:iaYnrGcx1QQ=:FwpgBRPB4uNFfh+4fVNWnE SjoOCQfj2ah9mIah3T1un9XF2WRv9EWVw3zlqNDAEnlhmujoAH0vfnSybJim/wSXN2fv9FLqv j+G5kheXeQ7sXDbQmxnRZWfJF2e3NYQZ94iMev1svl4j2hJcG12y8Q/cLaf6Xmb6S7s03+zea fXptjXdfQtDD2QtzyG1Rmp/wbSzRwC8uz3rBB+obmxLY/7fnHMEO8DHBXhVrDYi1suK6b5RtW JY4I3qhWEXRSmfBgIHzFCbj05YXK2K/lSWNo00JSvsIpAJuITIwSl5pvn5o72RyDg9t0owTk7 acg/0XWtouww4ygiAew2iGPkCfuf3xqkmd89PTabFc5K2E9cUKKc1rAV+EBBbXSTKmJrk1WpI b9g6bB7HZRiglgcgJLEI0+5QVqKSPuwxJsK2XYD/ZNQi6EOKYXADftQd2XPdPLlpzLLPUjaSf T9EG538ohYCrmdic8lZ6DUkjTaXjz8fJ4WiMI2WkciE56uCahDpP8YJzDmWnJ7Y9kPl9291a3 S2Usdli5VB54WJZX4Yfwl5tcmHUBEeZqOG8TRyeSN3Tty5Mu7kzxcjbCuC3BdTxKwMjXCu3ke y8ZvrlV8KWRxUKn6olpwcSMJrVx87OaaYVxfqBVHcElhSPNKMtAHIhNyK/jiGHv0Ad89WCYi3 zfswOJnKom7c1RjtU3DUWIgaus08ODFpJZrhXmpiNkaTy8TN5/mEKuaDzLqNFiSGC1sQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George Spelvin Geert Uytterhoeven 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 But here's an alternative. Geert, what do you think of this? Acked-by: George Spelvin Signed-off-by: Arnd Bergmann --- 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