mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: Joe Perches <joe@perches.com>
Cc: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192ee: checkpatch: use tabs for indent
Date: Sun, 03 Aug 2014 18:38:13 +0200	[thread overview]
Message-ID: <53DE6575.6070904@posteo.de> (raw)
In-Reply-To: <1407083245.12855.3.camel@joe-AO725>

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/
> 


  reply	other threads:[~2014-08-03 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 16:06 Martin Kepplinger
2014-08-03 16:27 ` Joe Perches
2014-08-03 16:38   ` Martin Kepplinger [this message]
2014-08-03 16:49     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53DE6575.6070904@posteo.de \
    --to=martink@posteo.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®