[PATCH 11/13] test_taint() should return bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 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);
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux