From patchwork Fri Dec 16 10:56:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101398 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1333800qgi; Fri, 16 Dec 2016 02:58:44 -0800 (PST) X-Received: by 10.84.132.35 with SMTP id 32mr5522467ple.44.1481885924782; Fri, 16 Dec 2016 02:58:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si7237634pgh.255.2016.12.16.02.58.44; Fri, 16 Dec 2016 02:58:44 -0800 (PST) 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 S1761338AbcLPK6b (ORCPT + 25 others); Fri, 16 Dec 2016 05:58:31 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:55252 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760762AbcLPK5G (ORCPT ); Fri, 16 Dec 2016 05:57:06 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LxwDU-1cemz02Ohw-015Lkn; Fri, 16 Dec 2016 11:56:50 +0100 From: Arnd Bergmann To: linux-arch@vger.kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@vger.kernel.org, Russell King , Andrew Morton , kernel-build-reports@lists.linaro.org, kvmarm@lists.cs.columbia.edu, Arnd Bergmann Subject: [PATCH 11/13] fs: fix unsigned enum warning with gcc-4.2 Date: Fri, 16 Dec 2016 11:56:32 +0100 Message-Id: <20161216105634.235457-12-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161216105634.235457-1-arnd@arndb.de> References: <20161216105634.235457-1-arnd@arndb.de> X-Provags-ID: V03:K0:1m16QfRKJmBLeVut8GQglfWvJ4vCfcjRq1W0ueAdlzeYE2jmQ+b C2kdCgH2936u44ccrF0pgag0qnBvJAXmzon5/crP/gQclYGPPaL97ng0Cju5RIeNoWBLmJU o47r8RwHNEZfZX3Dn5gVpbD5Z32Zf54TUOPYlWD8tQJrAUIr7KYgilZBVjqjlVmZn5NOcpD U8PFBvYck5qy/ZwVlj+ag== X-UI-Out-Filterresults: notjunk:1; V01:K0:9uKt/+l9ozw=:J/0u/yi1+xfvVIzlT+r0P8 FaNz1pRboV7/+LMq9bFQdGL+MDaBWeywzwJZyyDeNrB1BpPL1aoJfLi8HNk0bEjmeP/s8oT4L 753lNWirAD2qudwGc7PgtdlooZWin73v9EcrG+X1WtKtqL0Ns9OwiLSk3Jky5b4ZrqXrTdqTp 9j8x6DnYsv3nDQuVPJHW/biDGF+f6fLY0lBfqEo+4JPm7UsuvSZZC5y4PIHGH/LA4WAki3pOe 55ofB9fPUVT4O9UWDOHqGGfe3J659oy+wMI2xB7hOeb0OPna0+pUboJhV0TMs66Qq/89lBam1 4CcnSpzsF1tHdARX6mSBUvTGp/CNxt/8TAbj3r0VIu2cQxSkKS93jitbsxkpyTLCePxSljq5Q 8qSQC5tGywmXsph84XlubC1ksCa/7iehW5ms22qUIAB+M+plKkJfgiNhlBCKJmK8H7O3LJ2Fj tpRKXGfGerWa4TWca2Vy8FbYHOn0VP21b/8Isk7BziRvSVN2jHK2DjgUiQkpBLYI70E0VjIbi 2HIH09Tx/j/flD1HZuNnAsC8TrBcgc8CcWmPwjKl7K7nXUPQbtE0LnDdxzIAtsmmFBadlXd5G mRV99ScHA29l1kvP5A/O4Z7NLt/OcyfC5pnDIbLNHBzV2Tksbs2y02PPDFsw0EceOPhiXRVXK GBgcOTVaKLiWS4qBdABRxyRw6OrqjgXhc4X+Fwm42i6M0q10WpaFQ6YDGuaGnKkAvds8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With arm-linux-gcc-4.2, almost every file we build in the kernel ends up with this warning: include/linux/fs.h:2648: warning: comparison of unsigned expression < 0 is always false Later versions don't have this problem, but it's easy enough to work around. Signed-off-by: Arnd Bergmann --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/include/linux/fs.h b/include/linux/fs.h index 398cf20a706d..782c2a292fd7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2645,7 +2645,7 @@ static const char * const kernel_read_file_str[] = { static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) { - if (id < 0 || id >= READING_MAX_ID) + if ((unsigned)id >= READING_MAX_ID) return kernel_read_file_str[READING_UNKNOWN]; return kernel_read_file_str[id];