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

Greg KH
2015-05-31T02:09:46Z

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@gmail.com>
> ---
> .../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