Search Linux Wireless

Re: [PATCH 03/24] ath6kl: add cfg80211.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/13/2011 07:29 AM, Joe Perches wrote:
> On Wed, 2011-07-13 at 04:33 +0300, Kalle Valo wrote: 
>> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx>
>> diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> [] 
>> +static struct ieee80211_rate ath6kl_rates[] = {
> 
> const?
> 
>> +static struct ieee80211_channel ath6kl_2ghz_channels[] = {
> 
> const?
> 
>> +static struct ieee80211_channel ath6kl_5ghz_a_channels[] = {
> 
> const?
> 
>> +static struct ieee80211_supported_band ath6kl_band_2ghz = {
> 
> const?
> 
>> +static struct ieee80211_supported_band ath6kl_band_5ghz = {
> 
> const?

cfg80211 requires them to be non-const.

>> +		ath6kl_err("%s: %u not spported\n", __func__, wpa_version);
>> +		ath6kl_err("%s: 0x%x not spported\n", __func__, auth_type);
> 
> supported

Fixed.

>> +		wait_event_interruptible_timeout(ar->event_wq,
>> +						 ar->
>> +						 tx_pending[wmi_get_control_ep
>> +							     (ar->wmi)] == 0,
>> +						 WMI_TIMEOUT);
> 
> I think you can ignore 80 columns for this.
> 
> 		wait_event_interruptible_timeout(ar->event_wq,
> 						 ar->tx_pending[wmi_get_control_ep(ar->wmi)] == 0,
> 						 WMI_TIMEOUT);
> 
> or maybe use different argument alignment when appropriate:
> 
> 		wait_event_interruptible_timeout(ar->event_wq,
> 			ar->tx_pending[wmi_get_control_ep(ar->wmi)] == 0,
> 			WMI_TIMEOUT);

I took the latter approach to avoid checkpatch warnings.

>> +		if (sme->key_idx < WMI_MIN_KEY_INDEX
>> +		    || sme->key_idx > WMI_MAX_KEY_INDEX) {
> 
> I think it's more consistent with other files in drivers/net
> to use logical continuations at EOL
> 
> if (sme->key_idx < WMI_MIN_KEY_INDEX ||
>     sme->key_idx > WMI_MAX_KEY_INDEX) {

Yes, we just had missed that. Fixed.

> 
>> +			ath6kl_err("%s: key index %d out of bounds\n", __func__,
>> +				   sme->key_idx);
> 
> I think it's better to use format on one line,
> arguments on another.
> 
> 			ath6kl_err("%s: key index %d out of bounds\n",
> 				    __func__, sme->key_idx);
> 

Fixed.

> It seems almost all of your ath6kl_<level> logging
> messages use __func__.  Perhaps you might as well
> #define it to take __func__ instead of using it
> in-place over and over.

Actually I would like to get rid of __func__ usage from logging
altogether, IMHO they just clutter the logs. I started doing that but
haven't removed all of them yet (obviously).

Kalle
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux