lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Mar 2015 16:01:54 -0700
From:	Joe Perches <joe@...ches.com>
To:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>
Cc:	gregkh@...uxfoundation.org, mdcasey@...bloom.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: rtllib_wx: code style improvements

On Tue, 2015-03-10 at 23:53 +0100, Mateusz Kulikowski wrote:
> - Replaced printk() with netdev_*()

trivia:

> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
[]
> @@ -423,11 +421,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
>  					     NULL, (*crypt)->priv);
>  		if (len == 0) {
>  			/* Set a default key of all 0 */
> -			printk(KERN_INFO "Setting key %d to all zero.\n",
> -					   key);
> -
> -			RTLLIB_DEBUG_WX("Setting key %d to all zero.\n",
> -					   key);
> +			netdev_info(dev, "Setting key %d to all zero.\n", key);
> +			RTLLIB_DEBUG_WX("Setting key %d to all zero.\n", key);

This isn't something you've created but it
seems more than a bit nonsensical to emit the
same message at different logging levels.

and below....

> @@ -610,7 +605,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
>  	if (ops == NULL) {
>  		RTLLIB_DEBUG_WX("%s: unknown crypto alg %d\n",
>  				   dev->name, ext->alg);
> -		printk(KERN_INFO "========>unknown crypto alg %d\n", ext->alg);
> +		netdev_info(dev, "========>unknown crypto alg %d\n", ext->alg);
>  		ret = -EINVAL;
>  		goto done;
>  	}
> @@ -642,7 +637,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
>  	    (*crypt)->ops->set_key(ext->key, ext->key_len, ext->rx_seq,
>  				   (*crypt)->priv) < 0) {
>  		RTLLIB_DEBUG_WX("%s: key setting failed\n", dev->name);
> -		printk(KERN_INFO "key setting failed\n");
> +		netdev_info(dev, "key setting failed\n");
>  		ret = -EINVAL;
>  		goto done;
>  	}


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ