Messages in this thread | | | Subject | Re: [PATCH] Fixed coding style issues at ieee80211_crypt_wep.c | From | Joe Perches <> | Date | Fri, 15 May 2015 23:56:41 -0700 |
| |
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.
> }
| |