Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbfd0c10 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8c9e7bb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2678,7 +2678,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];