* [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent @ 2014-08-03 16:06 Martin Kepplinger 2014-08-03 16:27 ` Joe Perches 0 siblings, 1 reply; 4+ messages in thread From: Martin Kepplinger @ 2014-08-03 16:06 UTC (permalink / raw) To: gregkh; +Cc: Larry.Finger, linux-kernel, Martin Kepplinger Use tabs for code indent and use the kernel coding style. Signed-off-by: Martin Kepplinger <martink@posteo.de> --- applies to -next20140801 drivers/staging/rtl8192ee/regd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192ee/regd.c b/drivers/staging/rtl8192ee/regd.c index 7272fae..7841447 100644 --- a/drivers/staging/rtl8192ee/regd.c +++ b/drivers/staging/rtl8192ee/regd.c @@ -363,8 +363,7 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( static int _rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, struct wiphy *wiphy, void (*reg_notifier)(struct wiphy *wiphy, - struct regulatory_request * - request)) + struct regulatory_request *request)) { const struct ieee80211_regdomain *regd; -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent 2014-08-03 16:06 [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent Martin Kepplinger @ 2014-08-03 16:27 ` Joe Perches 2014-08-03 16:38 ` Martin Kepplinger 0 siblings, 1 reply; 4+ messages in thread From: Joe Perches @ 2014-08-03 16:27 UTC (permalink / raw) To: Martin Kepplinger; +Cc: gregkh, Larry.Finger, linux-kernel On Sun, 2014-08-03 at 18:06 +0200, Martin Kepplinger wrote: > Use tabs for code indent and use the kernel coding style. [] > diff --git a/drivers/staging/rtl8192ee/regd.c b/drivers/staging/rtl8192ee/regd.c [] > @@ -363,8 +363,7 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( > static int _rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, > struct wiphy *wiphy, > void (*reg_notifier)(struct wiphy *wiphy, > - struct regulatory_request * > - request)) > + struct regulatory_request *request)) > { > const struct ieee80211_regdomain *regd; > It seems that was done to keep the alignment of the function pointer arguments to the open parenthesis. If I were to do anything, it'd be to move the static int to a separate line and unindent the block a little For this file, maybe something like this: --- drivers/staging/rtl8192ee/regd.c | 120 +++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/drivers/staging/rtl8192ee/regd.c b/drivers/staging/rtl8192ee/regd.c index 7272fae..4fcb5f0 100644 --- a/drivers/staging/rtl8192ee/regd.c +++ b/drivers/staging/rtl8192ee/regd.c @@ -46,99 +46,99 @@ static struct country_code_to_enum_rd allcountries[] = { *Only these channels all allow active *scan on all world regulatory domains */ -#define RTL819x_2GHZ_CH01_11 \ +#define RTL819x_2GHZ_CH01_11 \ REG_RULE(2412-10, 2462+10, 40, 0, 20, 0) /* *We enable active scan on these a case *by case basis by regulatory domain */ -#define RTL819x_2GHZ_CH12_13 \ - REG_RULE(2467-10, 2472+10, 40, 0, 20,\ - NL80211_RRF_PASSIVE_SCAN) +#define RTL819x_2GHZ_CH12_13 \ + REG_RULE(2467-10, 2472+10, 40, 0, 20, \ + NL80211_RRF_PASSIVE_SCAN) -#define RTL819x_2GHZ_CH14 \ - REG_RULE(2484-10, 2484+10, 40, 0, 20, \ - NL80211_RRF_PASSIVE_SCAN | \ - NL80211_RRF_NO_OFDM) +#define RTL819x_2GHZ_CH14 \ + REG_RULE(2484-10, 2484+10, 40, 0, 20, \ + NL80211_RRF_PASSIVE_SCAN | \ + NL80211_RRF_NO_OFDM) /* 5G chan 36 - chan 64*/ -#define RTL819x_5GHZ_5150_5350 \ - REG_RULE(5150-10, 5350+10, 80, 0, 30, \ - NL80211_RRF_PASSIVE_SCAN | \ - NL80211_RRF_NO_IBSS) +#define RTL819x_5GHZ_5150_5350 \ + REG_RULE(5150-10, 5350+10, 80, 0, 30, \ + NL80211_RRF_PASSIVE_SCAN | \ + NL80211_RRF_NO_IBSS) /* 5G chan 100 - chan 165*/ -#define RTL819x_5GHZ_5470_5850 \ - REG_RULE(5470-10, 5850+10, 80, 0, 30, \ - NL80211_RRF_PASSIVE_SCAN | \ - NL80211_RRF_NO_IBSS) +#define RTL819x_5GHZ_5470_5850 \ + REG_RULE(5470-10, 5850+10, 80, 0, 30, \ + NL80211_RRF_PASSIVE_SCAN | \ + NL80211_RRF_NO_IBSS) /* 5G chan 149 - chan 165*/ -#define RTL819x_5GHZ_5725_5850 \ - REG_RULE(5725-10, 5850+10, 80, 0, 30, \ - NL80211_RRF_PASSIVE_SCAN | \ - NL80211_RRF_NO_IBSS) +#define RTL819x_5GHZ_5725_5850 \ + REG_RULE(5725-10, 5850+10, 80, 0, 30, \ + NL80211_RRF_PASSIVE_SCAN | \ + NL80211_RRF_NO_IBSS) -#define RTL819x_5GHZ_ALL \ +#define RTL819x_5GHZ_ALL \ (RTL819x_5GHZ_5150_5350, RTL819x_5GHZ_5470_5850) static const struct ieee80211_regdomain rtl_regdom_11 = { .n_reg_rules = 1, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - } + RTL819x_2GHZ_CH01_11, + } }; static const struct ieee80211_regdomain rtl_regdom_12_13 = { .n_reg_rules = 2, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - RTL819x_2GHZ_CH12_13, - } + RTL819x_2GHZ_CH01_11, + RTL819x_2GHZ_CH12_13, + } }; static const struct ieee80211_regdomain rtl_regdom_no_midband = { .n_reg_rules = 3, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - RTL819x_5GHZ_5150_5350, - RTL819x_5GHZ_5725_5850, - } + RTL819x_2GHZ_CH01_11, + RTL819x_5GHZ_5150_5350, + RTL819x_5GHZ_5725_5850, + } }; static const struct ieee80211_regdomain rtl_regdom_60_64 = { .n_reg_rules = 3, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - RTL819x_2GHZ_CH12_13, - RTL819x_5GHZ_5725_5850, - } + RTL819x_2GHZ_CH01_11, + RTL819x_2GHZ_CH12_13, + RTL819x_5GHZ_5725_5850, + } }; static const struct ieee80211_regdomain rtl_regdom_14_60_64 = { .n_reg_rules = 4, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - RTL819x_2GHZ_CH12_13, - RTL819x_2GHZ_CH14, - RTL819x_5GHZ_5725_5850, - } + RTL819x_2GHZ_CH01_11, + RTL819x_2GHZ_CH12_13, + RTL819x_2GHZ_CH14, + RTL819x_5GHZ_5725_5850, + } }; static const struct ieee80211_regdomain rtl_regdom_14 = { .n_reg_rules = 3, .alpha2 = "99", .reg_rules = { - RTL819x_2GHZ_CH01_11, - RTL819x_2GHZ_CH12_13, - RTL819x_2GHZ_CH14, - } + RTL819x_2GHZ_CH01_11, + RTL819x_2GHZ_CH12_13, + RTL819x_2GHZ_CH14, + } }; static bool _rtl_is_radar_freq(u16 center_freq) @@ -146,8 +146,9 @@ static bool _rtl_is_radar_freq(u16 center_freq) return center_freq >= 5260 && center_freq <= 5700; } -static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, - enum nl80211_reg_initiator initiator) +static void +_rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, + enum nl80211_reg_initiator initiator) { enum ieee80211_band band; struct ieee80211_supported_band *sband; @@ -186,20 +187,20 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) ch->flags &= - ~IEEE80211_CHAN_PASSIVE_SCAN; + ~IEEE80211_CHAN_PASSIVE_SCAN; } else { if (ch->beacon_found) ch->flags &= ~(IEEE80211_CHAN_NO_IBSS | - IEEE80211_CHAN_PASSIVE_SCAN); + IEEE80211_CHAN_PASSIVE_SCAN); } } } } /* Allows active scan scan on Ch 12 and 13 */ -static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, - enum nl80211_reg_initiator - initiator) +static void +_rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, + enum nl80211_reg_initiator initiator) { struct ieee80211_supported_band *sband; struct ieee80211_channel *ch; @@ -279,9 +280,9 @@ static void _rtl_reg_apply_radar_flags(struct wiphy *wiphy) *do not allow AP mode */ if (!(ch->flags & IEEE80211_CHAN_DISABLED)) - ch->flags |= IEEE80211_CHAN_RADAR | - IEEE80211_CHAN_NO_IBSS | - IEEE80211_CHAN_PASSIVE_SCAN; + ch->flags |= (IEEE80211_CHAN_RADAR | + IEEE80211_CHAN_NO_IBSS | + IEEE80211_CHAN_PASSIVE_SCAN); } } @@ -332,8 +333,8 @@ static int _rtl92e_reg_notifier_apply(struct wiphy *wiphy, return 0; } -static const struct ieee80211_regdomain *_rtl_regdomain_select( - struct rtl_regulatory *reg) +static const struct ieee80211_regdomain * +_rtl_regdomain_select(struct rtl_regulatory *reg) { switch (reg->country_code) { case COUNTRY_CODE_FCC: @@ -360,11 +361,10 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( } } -static int _rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, - struct wiphy *wiphy, - void (*reg_notifier)(struct wiphy *wiphy, - struct regulatory_request * - request)) +static int +_rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, struct wiphy *wiphy, + void (*reg_notifier)(struct wiphy *wiphy, + struct regulatory_request *request)) { const struct ieee80211_regdomain *regd; ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent 2014-08-03 16:27 ` Joe Perches @ 2014-08-03 16:38 ` Martin Kepplinger 2014-08-03 16:49 ` Joe Perches 0 siblings, 1 reply; 4+ messages in thread From: Martin Kepplinger @ 2014-08-03 16:38 UTC (permalink / raw) To: Joe Perches; +Cc: gregkh, Larry.Finger, linux-kernel Am 2014-08-03 18:27, schrieb Joe Perches: > On Sun, 2014-08-03 at 18:06 +0200, Martin Kepplinger wrote: >> Use tabs for code indent and use the kernel coding style. > [] >> diff --git a/drivers/staging/rtl8192ee/regd.c b/drivers/staging/rtl8192ee/regd.c > [] >> @@ -363,8 +363,7 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( >> static int _rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, >> struct wiphy *wiphy, >> void (*reg_notifier)(struct wiphy *wiphy, >> - struct regulatory_request * >> - request)) >> + struct regulatory_request *request)) >> { >> const struct ieee80211_regdomain *regd; >> > > It seems that was done to keep the alignment of the function > pointer arguments to the open parenthesis. > > If I were to do anything, it'd be to move the static int > to a separate line and unindent the block a little > > For this file, maybe something like this: > --- > drivers/staging/rtl8192ee/regd.c | 120 +++++++++++++++++++-------------------- > 1 file changed, 60 insertions(+), 60 deletions(-) > > diff --git a/drivers/staging/rtl8192ee/regd.c b/drivers/staging/rtl8192ee/regd.c > index 7272fae..4fcb5f0 100644 > --- a/drivers/staging/rtl8192ee/regd.c > +++ b/drivers/staging/rtl8192ee/regd.c > @@ -46,99 +46,99 @@ static struct country_code_to_enum_rd allcountries[] = { > *Only these channels all allow active > *scan on all world regulatory domains > */ > -#define RTL819x_2GHZ_CH01_11 \ > +#define RTL819x_2GHZ_CH01_11 \ > REG_RULE(2412-10, 2462+10, 40, 0, 20, 0) > > /* > *We enable active scan on these a case > *by case basis by regulatory domain > */ > -#define RTL819x_2GHZ_CH12_13 \ > - REG_RULE(2467-10, 2472+10, 40, 0, 20,\ > - NL80211_RRF_PASSIVE_SCAN) > +#define RTL819x_2GHZ_CH12_13 \ > + REG_RULE(2467-10, 2472+10, 40, 0, 20, \ > + NL80211_RRF_PASSIVE_SCAN) > > -#define RTL819x_2GHZ_CH14 \ > - REG_RULE(2484-10, 2484+10, 40, 0, 20, \ > - NL80211_RRF_PASSIVE_SCAN | \ > - NL80211_RRF_NO_OFDM) > +#define RTL819x_2GHZ_CH14 \ > + REG_RULE(2484-10, 2484+10, 40, 0, 20, \ > + NL80211_RRF_PASSIVE_SCAN | \ > + NL80211_RRF_NO_OFDM) > > /* 5G chan 36 - chan 64*/ > -#define RTL819x_5GHZ_5150_5350 \ > - REG_RULE(5150-10, 5350+10, 80, 0, 30, \ > - NL80211_RRF_PASSIVE_SCAN | \ > - NL80211_RRF_NO_IBSS) > +#define RTL819x_5GHZ_5150_5350 \ > + REG_RULE(5150-10, 5350+10, 80, 0, 30, \ > + NL80211_RRF_PASSIVE_SCAN | \ > + NL80211_RRF_NO_IBSS) > > /* 5G chan 100 - chan 165*/ > -#define RTL819x_5GHZ_5470_5850 \ > - REG_RULE(5470-10, 5850+10, 80, 0, 30, \ > - NL80211_RRF_PASSIVE_SCAN | \ > - NL80211_RRF_NO_IBSS) > +#define RTL819x_5GHZ_5470_5850 \ > + REG_RULE(5470-10, 5850+10, 80, 0, 30, \ > + NL80211_RRF_PASSIVE_SCAN | \ > + NL80211_RRF_NO_IBSS) > > /* 5G chan 149 - chan 165*/ > -#define RTL819x_5GHZ_5725_5850 \ > - REG_RULE(5725-10, 5850+10, 80, 0, 30, \ > - NL80211_RRF_PASSIVE_SCAN | \ > - NL80211_RRF_NO_IBSS) > +#define RTL819x_5GHZ_5725_5850 \ > + REG_RULE(5725-10, 5850+10, 80, 0, 30, \ > + NL80211_RRF_PASSIVE_SCAN | \ > + NL80211_RRF_NO_IBSS) > > -#define RTL819x_5GHZ_ALL \ > +#define RTL819x_5GHZ_ALL \ > (RTL819x_5GHZ_5150_5350, RTL819x_5GHZ_5470_5850) > > static const struct ieee80211_regdomain rtl_regdom_11 = { > .n_reg_rules = 1, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - } > + RTL819x_2GHZ_CH01_11, > + } > }; > > static const struct ieee80211_regdomain rtl_regdom_12_13 = { > .n_reg_rules = 2, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - RTL819x_2GHZ_CH12_13, > - } > + RTL819x_2GHZ_CH01_11, > + RTL819x_2GHZ_CH12_13, > + } > }; > > static const struct ieee80211_regdomain rtl_regdom_no_midband = { > .n_reg_rules = 3, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - RTL819x_5GHZ_5150_5350, > - RTL819x_5GHZ_5725_5850, > - } > + RTL819x_2GHZ_CH01_11, > + RTL819x_5GHZ_5150_5350, > + RTL819x_5GHZ_5725_5850, > + } > }; > > static const struct ieee80211_regdomain rtl_regdom_60_64 = { > .n_reg_rules = 3, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - RTL819x_2GHZ_CH12_13, > - RTL819x_5GHZ_5725_5850, > - } > + RTL819x_2GHZ_CH01_11, > + RTL819x_2GHZ_CH12_13, > + RTL819x_5GHZ_5725_5850, > + } > }; > > static const struct ieee80211_regdomain rtl_regdom_14_60_64 = { > .n_reg_rules = 4, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - RTL819x_2GHZ_CH12_13, > - RTL819x_2GHZ_CH14, > - RTL819x_5GHZ_5725_5850, > - } > + RTL819x_2GHZ_CH01_11, > + RTL819x_2GHZ_CH12_13, > + RTL819x_2GHZ_CH14, > + RTL819x_5GHZ_5725_5850, > + } > }; > > static const struct ieee80211_regdomain rtl_regdom_14 = { > .n_reg_rules = 3, > .alpha2 = "99", > .reg_rules = { > - RTL819x_2GHZ_CH01_11, > - RTL819x_2GHZ_CH12_13, > - RTL819x_2GHZ_CH14, > - } > + RTL819x_2GHZ_CH01_11, > + RTL819x_2GHZ_CH12_13, > + RTL819x_2GHZ_CH14, > + } > }; > > static bool _rtl_is_radar_freq(u16 center_freq) > @@ -146,8 +146,9 @@ static bool _rtl_is_radar_freq(u16 center_freq) > return center_freq >= 5260 && center_freq <= 5700; > } > > -static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, > - enum nl80211_reg_initiator initiator) > +static void > +_rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, > + enum nl80211_reg_initiator initiator) > { > enum ieee80211_band band; > struct ieee80211_supported_band *sband; > @@ -186,20 +187,20 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, > if (!(reg_rule->flags & > NL80211_RRF_PASSIVE_SCAN)) > ch->flags &= > - ~IEEE80211_CHAN_PASSIVE_SCAN; > + ~IEEE80211_CHAN_PASSIVE_SCAN; > } else { > if (ch->beacon_found) > ch->flags &= ~(IEEE80211_CHAN_NO_IBSS | > - IEEE80211_CHAN_PASSIVE_SCAN); > + IEEE80211_CHAN_PASSIVE_SCAN); > } > } > } > } > > /* Allows active scan scan on Ch 12 and 13 */ > -static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, > - enum nl80211_reg_initiator > - initiator) > +static void > +_rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, > + enum nl80211_reg_initiator initiator) > { > struct ieee80211_supported_band *sband; > struct ieee80211_channel *ch; > @@ -279,9 +280,9 @@ static void _rtl_reg_apply_radar_flags(struct wiphy *wiphy) > *do not allow AP mode > */ > if (!(ch->flags & IEEE80211_CHAN_DISABLED)) > - ch->flags |= IEEE80211_CHAN_RADAR | > - IEEE80211_CHAN_NO_IBSS | > - IEEE80211_CHAN_PASSIVE_SCAN; > + ch->flags |= (IEEE80211_CHAN_RADAR | > + IEEE80211_CHAN_NO_IBSS | > + IEEE80211_CHAN_PASSIVE_SCAN); > } > } > > @@ -332,8 +333,8 @@ static int _rtl92e_reg_notifier_apply(struct wiphy *wiphy, > return 0; > } > > -static const struct ieee80211_regdomain *_rtl_regdomain_select( > - struct rtl_regulatory *reg) > +static const struct ieee80211_regdomain * > +_rtl_regdomain_select(struct rtl_regulatory *reg) > { > switch (reg->country_code) { > case COUNTRY_CODE_FCC: > @@ -360,11 +361,10 @@ static const struct ieee80211_regdomain *_rtl_regdomain_select( > } > } > > -static int _rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, > - struct wiphy *wiphy, > - void (*reg_notifier)(struct wiphy *wiphy, > - struct regulatory_request * > - request)) > +static int > +_rtl92e_regd_init_wiphy(struct rtl_regulatory *reg, struct wiphy *wiphy, > + void (*reg_notifier)(struct wiphy *wiphy, > + struct regulatory_request *request)) > { > const struct ieee80211_regdomain *regd; > > I'd rather have the return value on the same line than aligned parameters but that's taste. Either way looks better and satisfies checkpatch, which is the only goal. > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent 2014-08-03 16:38 ` Martin Kepplinger @ 2014-08-03 16:49 ` Joe Perches 0 siblings, 0 replies; 4+ messages in thread From: Joe Perches @ 2014-08-03 16:49 UTC (permalink / raw) To: Martin Kepplinger; +Cc: gregkh, Larry.Finger, linux-kernel On Sun, 2014-08-03 at 18:38 +0200, Martin Kepplinger wrote: > I'd rather have the return value on the same line than aligned > parameters but that's taste. Either way looks better and satisfies > checkpatch, which is the only goal. Satisfying checkpatch should not be high on the goal list. Consistent readability should be though. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-03 16:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-03 16:06 [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent Martin Kepplinger 2014-08-03 16:27 ` Joe Perches 2014-08-03 16:38 ` Martin Kepplinger 2014-08-03 16:49 ` Joe Perches
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.