staging: comedi: mite.h: tidy up mite_csigr_wpdep()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 16 Jul 2014 17:43:43 +0000 (10:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:34:24 +0000 (13:34 -0700)
Refactor this inline function to fix the checkpatch.pl warnings:

WARNING: Missing a blank line after declarations
WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/mite.h

index 33d87a2395321e8c50ab11dcd80a85da29f40659..ef7172af7031230e0de6b5d679cf33b46fa826da 100644 (file)
@@ -184,11 +184,9 @@ static inline int mite_csigr_dmac(u32 csigr_bits)
 static inline int mite_csigr_wpdep(u32 csigr_bits)
 {                              /*  write post fifo depth */
        unsigned int wpdep_bits = (csigr_bits >> 20) & 0x7;
-       if (wpdep_bits == 0)
-               return 0;
-       else
-               return 1 << (wpdep_bits - 1);
-};
+
+       return (wpdep_bits) ? (1 << (wpdep_bits - 1)) : 0;
+}
 
 static inline int mite_csigr_wins(u32 csigr_bits)
 {
This page took 0.024857 seconds and 5 git commands to generate.