From patchwork Wed Aug 10 21:54:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101953 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp610258qga; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) X-Received: by 10.98.27.200 with SMTP id b191mr10981230pfb.111.1470866348220; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ul9si50471292pab.14.2016.08.10.14.59.07; Wed, 10 Aug 2016 14:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933535AbcHJV6x (ORCPT + 27 others); 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 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MXkkl-1bl8CW0JoF-00Wk3C; Wed, 10 Aug 2016 23:58:47 +0200 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 Precedence: bulk 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(-) -- 2.9.0 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