From: Sergio Paracuellos Date: Thu, 29 Mar 2018 18:07:52 +0000 (+0200) Subject: staging: ks7010: replace IS_OFDM_RATE macro with inline function X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fe03074ff1851e6ceba966f18ab77a1cd1eea27c;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: replace IS_OFDM_RATE macro with inline function This commit replaces IS_OFDM_RATE macro with is_ofdm_rate inline function. This also fix checkpatch warning about more than 80 spaces line. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index ae2adbf9b8a6..04bff238edc9 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -564,12 +564,19 @@ static inline bool is_11b_rate(u8 rate) ((rate & RATE_MASK) == TX_RATE_11M)); } -#define IS_OFDM_RATE(A) (((A & RATE_MASK) == TX_RATE_6M) || ((A & RATE_MASK) == TX_RATE_12M) || \ - ((A & RATE_MASK) == TX_RATE_24M) || ((A & RATE_MASK) == TX_RATE_9M) || \ - ((A & RATE_MASK) == TX_RATE_18M) || ((A & RATE_MASK) == TX_RATE_36M) || \ - ((A & RATE_MASK) == TX_RATE_48M) || ((A & RATE_MASK) == TX_RATE_54M)) +static inline bool is_ofdm_rate(u8 rate) +{ + return (((rate & RATE_MASK) == TX_RATE_6M) || + ((rate & RATE_MASK) == TX_RATE_12M) || + ((rate & RATE_MASK) == TX_RATE_24M) || + ((rate & RATE_MASK) == TX_RATE_9M) || + ((rate & RATE_MASK) == TX_RATE_18M) || + ((rate & RATE_MASK) == TX_RATE_36M) || + ((rate & RATE_MASK) == TX_RATE_48M) || + ((rate & RATE_MASK) == TX_RATE_54M)); +} -#define IS_11BG_RATE(A) (is_11b_rate(A) || IS_OFDM_RATE(A)) +#define IS_11BG_RATE(A) (is_11b_rate(A) || is_ofdm_rate(A)) #define IS_OFDM_EXT_RATE(A) (((A & RATE_MASK) == TX_RATE_9M) || ((A & RATE_MASK) == TX_RATE_18M) || \ ((A & RATE_MASK) == TX_RATE_36M) || ((A & RATE_MASK) == TX_RATE_48M) || \