lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 11/13] test_taint() should return bool
From
Date
test_taint() should return bool as it returns a boolean value.  This allows
gcc to make better decisions about using the return value, though it might
make test_taint() itself slightly bigger.

Signed-off-by: David Howells <dhowells@redhat.com>
---

include/linux/kernel.h | 2 +-
kernel/panic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 3a5b48e52a9e..77670ddcd686 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -453,7 +453,7 @@ enum lockdep_ok {
LOCKDEP_NOW_UNRELIABLE
};
extern void add_taint(unsigned flag, enum lockdep_ok);
-extern int test_taint(unsigned flag);
+extern bool test_taint(unsigned flag);
extern unsigned long get_taint(void);
extern int root_mountflags;

diff --git a/kernel/panic.c b/kernel/panic.c
index 8136ad76e5fd..17f056eab21a 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -272,7 +272,7 @@ const char *print_tainted(void)
return buf;
}

-int test_taint(unsigned flag)
+bool test_taint(unsigned flag)
{
return test_bit(flag, &tainted_mask);
}


\
 
 \ /
  Last update: 2015-04-29 21:41    [W:2.410 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site