From: H Hartley Sweeten Date: Wed, 16 Jul 2014 17:43:43 +0000 (-0700) Subject: staging: comedi: mite.h: tidy up mite_csigr_wpdep() X-Git-Tag: v3.17-rc1~123^2~632 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3176b5e95edf9790dfa1b4759b21b41725666a73;p=karo-tx-linux.git staging: comedi: mite.h: tidy up mite_csigr_wpdep() 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h index 33d87a239532..ef7172af7031 100644 --- a/drivers/staging/comedi/drivers/mite.h +++ b/drivers/staging/comedi/drivers/mite.h @@ -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) {