diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-03-09 19:16:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-09 20:01:09 -0500 |
commit | cbfd0c1001bedb4b051cf4a1f5df24f1500381bc (patch) | |
tree | c3e8c87a24c2fffaa60c9e3c9c70498aa6e8c61d /include/linux/fs.h | |
parent | 8c9e7bb7a41f2bbd54b2caefb274fb3de239819f (diff) |
include/linux/fs.h: fix unsigned enum warning with gcc-4.2
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.
Link: http://lkml.kernel.org/r/20161216105634.235457-12-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index aad3fd0ff5f8..7251f7bb45e8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2678,7 +2678,7 @@ static const char * const kernel_read_file_str[] = { | |||
2678 | 2678 | ||
2679 | static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) | 2679 | static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) |
2680 | { | 2680 | { |
2681 | if (id < 0 || id >= READING_MAX_ID) | 2681 | if ((unsigned)id >= READING_MAX_ID) |
2682 | return kernel_read_file_str[READING_UNKNOWN]; | 2682 | return kernel_read_file_str[READING_UNKNOWN]; |
2683 | 2683 | ||
2684 | return kernel_read_file_str[id]; | 2684 | return kernel_read_file_str[id]; |