[OPW,kernel,v3,1/3] net: wireless: replace printk with pr_warn in adm8211.c
diff mbox

Message ID 20131026192053.GA10494@fireworks
State Rejected
Headers show

Commit Message

Georgiana Rodica Chelu Oct. 26, 2013, 7:20 p.m. UTC
WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...
to printk(KERN_WARNING ...

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
 drivers/net/wireless/adm8211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Oct. 28, 2013, 9:30 p.m. UTC | #1
On Sat, Oct 26, 2013 at 10:20:53PM +0300, Georgiana Rodica Chelu wrote:
> WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...
> to printk(KERN_WARNING ...
> 
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> ---
>  drivers/net/wireless/adm8211.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Like Sarah said, we can't take these as they are not against the staging
tree.

And even if they were:

> diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
> index f9a24e5..e36d54d 100644
> --- a/drivers/net/wireless/adm8211.c
> +++ b/drivers/net/wireless/adm8211.c
> @@ -151,7 +151,7 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
>  		else
>  			priv->rf_type = ADM8211_TYPE_AIROHA;
>  
> -		printk(KERN_WARNING "%s (adm8211): Unknown RFtype %d\n",
> +		pr_warn("%s (adm8211): Unknown RFtype %d\n",

You didn't read the message that sparse was telling you, why didn't you
convert this to netdev_warn() instead?

thanks,

greg k-h

Patch
diff mbox

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index f9a24e5..e36d54d 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -151,7 +151,7 @@  static int adm8211_read_eeprom(struct ieee80211_hw *dev)
 		else
 			priv->rf_type = ADM8211_TYPE_AIROHA;
 
-		printk(KERN_WARNING "%s (adm8211): Unknown RFtype %d\n",
+		pr_warn("%s (adm8211): Unknown RFtype %d\n",
 		       pci_name(priv->pdev), (cr49 >> 3) & 0x7);
 	}