Re: [PATCH] Fixed coding style issues at ieee80211_crypt_wep.c

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

 



On Sat, 2015-05-16 at 10:40 +0200, Pedro Marzo Perez wrote:
> This patch just fixes some warnings and style errors reported by checkpatch.pl script
>     - Braces should not start in a new line
>     - C99 comments are not allowed (never use //)
>     - Literal strings should never be parted in several lines
>     - There was a useless return on a void function

Some will say this is doing too many things in a single patch.

> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
[]

> +		pr_debug("ieee80211_crypt_wep: could not allocate crypto API arc4\n");
[]
> +		pr_debug("ieee80211_crypt_wep: could not allocate crypto API arc4\n");

These could use a pr_fmt prefix and the "ieee80211_crypt_wep: "
could be removed.

In fact, these could be consolidated into a single line if
moved into the fail block if the first allocation does
a direct return NULL instead of goto fail.

> @@ -293,6 +288,5 @@ void __exit ieee80211_crypto_wep_exit(void)
>  
>  void ieee80211_wep_null(void)
>  {
> -//	printk("============>%s()\n", __func__);
> -	return;
> +    /*printk("============>%s()\n", __func__);*/

Just delete this instead.

>  }



_______________________________________________
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