OSDN Git Service

staging: wilc1000: drop explicit conversion to bool
authorNicholas Mc Guire <hofrat@osadl.org>
Sat, 6 Apr 2019 09:45:27 +0000 (11:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Apr 2019 11:15:53 +0000 (13:15 +0200)
As the expression evaluates to a boolean anyway (relational and logical
operators) conversion with the ternary operator is not needed here as
coccinelle notes (boolconv.cocci)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wlan.c

index c238969..f5443de 100644 (file)
@@ -11,7 +11,7 @@
 
 static inline bool is_wilc1000(u32 id)
 {
-       return ((id & 0xfffff000) == 0x100000 ? true : false);
+       return (id & 0xfffff000) == 0x100000;
 }
 
 static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)