lkml.org 
[lkml]   [2015]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Fixed coding style issues at ieee80211_crypt_wep.c
From
Date
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.

> }





\
 
 \ /
  Last update: 2015-05-16 09:21    [W:0.054 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site