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

Message ID 20131024213026.GA3569@fireworks
State Changes Requested
Headers show

Commit Message

Georgiana Rodica Chelu Oct. 24, 2013, 9:30 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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Joe Perches Oct. 24, 2013, 10:46 p.m. UTC | #1
On Fri, 2013-10-25 at 00:30 +0300, Georgiana Rodica Chelu wrote:
> WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...
> to printk(KERN_WARNING ...

Hi Georgiana.

Please compile and test your patches before submitting them.

> diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c

> @@ -151,8 +151,9 @@ 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",
> -		       pci_name(priv->pdev), (cr49 >> 3) & 0x7);
> +		netdev_warn(priv->pdev, "(adm8211): Unknown RFtype %d\n",
> +			    pci_name(priv->pdev), (cr49 >> 3) & 0x7);
> +
>  	}
>  
>  	priv->bbp_type = cr49 & 0x7;

netdev_warn 1st arg is a struct net_device *
priv->pdev is a struct pci_dev *
Sarah Sharp Oct. 28, 2013, 8:35 p.m. UTC | #2
Hi Georgiana,

Until you get your first patch accepted into the kernel, please stick
with cleaning up drivers in the drivers/staging/ directory and only
submit patches to the OPW mailing lists.  The goal is to make sure that
you have a good experience with submitting your first kernel patches,
and we can't guarantee that if you're already wading into the main
kernel mailing lists. :)

Once you have some patches accepted that clean up staging drivers, you
can move onto working with mentors on their drivers.  But for now,
please stick with staging drivers.

Thanks,
Sarah Sharp

On Fri, Oct 25, 2013 at 12:30:26AM +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 | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
> index f9a24e5..0d0dcba 100644
> --- a/drivers/net/wireless/adm8211.c
> +++ b/drivers/net/wireless/adm8211.c
> @@ -151,8 +151,9 @@ 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",
> -		       pci_name(priv->pdev), (cr49 >> 3) & 0x7);
> +		netdev_warn(priv->pdev, "(adm8211): Unknown RFtype %d\n",
> +			    pci_name(priv->pdev), (cr49 >> 3) & 0x7);
> +
>  	}
>  
>  	priv->bbp_type = cr49 & 0x7;
> -- 
> 1.8.1.2
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index f9a24e5..0d0dcba 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -151,8 +151,9 @@  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",
-		       pci_name(priv->pdev), (cr49 >> 3) & 0x7);
+		netdev_warn(priv->pdev, "(adm8211): Unknown RFtype %d\n",
+			    pci_name(priv->pdev), (cr49 >> 3) & 0x7);
+
 	}
 
 	priv->bbp_type = cr49 & 0x7;