Re: [PATCH] Staging: wlan-ng: fixed "line over 80 characters" warnings

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

 



On Sat, Aug 06, 2016 at 08:20:16PM +0300, Claudiu Beznea wrote:
> This patch fix "line over 80 characters" checkpatch.pl
> warnings. In cfg80211.c file some of these warnings
> were fixed by adding duplicate code in a separate
> function.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
> ---
>  drivers/staging/wlan-ng/cfg80211.c  | 148 ++++++++++++++++--------------------
>  drivers/staging/wlan-ng/hfa384x.h   |   2 +-
>  drivers/staging/wlan-ng/p80211hdr.h |   3 +-
>  3 files changed, 68 insertions(+), 85 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
> index f46dfe6..8523cd5 100644
> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -97,6 +97,45 @@ static int prism2_domibset_pstr32(wlandevice_t *wlandev,
>  	return p80211req_dorequest(wlandev, (u8 *)&msg);
>  }
>  
> +static int prism2_key_index_to_did(u8 key_index, u32 *did)
> +{
> +	int err = 0;
> +
> +	if (!did) {
> +		err = -EINVAL;
> +		goto exit;
> +	}
> +
> +	switch (key_index) {
> +	case 0:
> +		*did =
> +		DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0;
> +		break;

Ick!

Is that readable?

Please make sane fixes, perhaps the original was just fine?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux