Re: [PATCH 1/3 v3] Staging: rtl8192u: Simplify error check code at prism2_wep_init

From: Greg KH
Date: Sat May 30 2015 - 22:09:52 EST


On Tue, May 19, 2015 at 01:32:22AM +0200, Pedro Marzo Perez wrote:
> Merge two pr_debug lines with literal strings splitted across several lines
> into one single line, simplifying prism2_wep_init error check code.
>
> Signed-off-by: Pedro Marzo Perez <marzo.pedro@xxxxxxxxx>
> ---
> .../rtl8192u/ieee80211/ieee80211_crypt_wep.c | 22 +++++++++-------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> index 0a17f84..388ed3c 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
> @@ -9,6 +9,8 @@
> * more details.
> */
>
> +#define pr_fmt(fmt) "ieee80211_crypt_wep: " fmt

Like Dan said, don't do this in a driver. It's a driver, you almost
always have access to the device being operated on, so use the dev_*
functions.

This is a network driver, so use the netdev_* functions, which are even
better. But never the pr_* functions, that's not ok.

Please fix up and resend.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/