All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk
@ 2016-09-23 21:33 Georgiana Rodica Chelu
  2016-09-25 10:35 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Georgiana Rodica Chelu @ 2016-09-23 21:33 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh

The checkpatch.pl script found the following warning:

WARNING: printk() should include KERN_ facility level

After adding the KERN_ facility level to printk(), the script showed
another warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion,
use netdev_info(), netdev_err() or netdev_dbg() when there is
a netdev device and use pr_info() in the remained cases.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
Changes in v2:
        - make the commit message more clear
	- replace all the appearances of printk()

 drivers/staging/ks7010/ks_wlan_net.c | 92 ++++++++++++++++++------------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index d13a06b..9ef44cc 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -233,9 +233,9 @@ static int ks_wlan_set_freq(struct net_device *dev,
 		/* We should do a better check than that,
 		 * based on the card capability !!! */
 		if ((channel < 1) || (channel > 14)) {
-			printk(KERN_DEBUG
-			       "%s: New channel value of %d is invalid!\n",
-			       dev->name, fwrq->m);
+			netdev_dbg(dev,
+				   "%s: New channel value of %d is invalid!\n",
+				   dev->name, fwrq->m);
 			rc = -EINVAL;
 		} else {
 			/* Yes ! We can set it !!! */
@@ -2671,17 +2671,17 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev,
 
 	if (*uwrq == SLP_SLEEP) {
 		priv->sleep_mode = *uwrq;
-		printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
+		netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
 
 		hostif_sme_enqueue(priv, SME_STOP_REQUEST);
 		hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
 
 	} else if (*uwrq == SLP_ACTIVE) {
 		priv->sleep_mode = *uwrq;
-		printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
+		netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
 		hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
 	} else {
-		printk("SET_SLEEP_MODE %d errror\n", *uwrq);
+		netdev_err(dev, "SET_SLEEP_MODE %d errror\n", *uwrq);
 		return -EINVAL;
 	}
 
@@ -2783,7 +2783,7 @@ static int ks_wlan_get_wps_enable(struct net_device *dev,
 	}
 	/* for SLEEP MODE */
 	*uwrq = priv->wps.wps_enabled;
-	printk("return=%d\n", *uwrq);
+	netdev_info(dev, "return=%d\n", *uwrq);
 
 	return 0;
 }
@@ -2978,112 +2978,112 @@ static void print_hif_event(int event)
 
 	switch (event) {
 	case HIF_DATA_REQ:
-		printk("HIF_DATA_REQ\n");
+		pr_info("HIF_DATA_REQ\n");
 		break;
 	case HIF_DATA_IND:
-		printk("HIF_DATA_IND\n");
+		pr_info("HIF_DATA_IND\n");
 		break;
 	case HIF_MIB_GET_REQ:
-		printk("HIF_MIB_GET_REQ\n");
+		pr_info("HIF_MIB_GET_REQ\n");
 		break;
 	case HIF_MIB_GET_CONF:
-		printk("HIF_MIB_GET_CONF\n");
+		pr_info("HIF_MIB_GET_CONF\n");
 		break;
 	case HIF_MIB_SET_REQ:
-		printk("HIF_MIB_SET_REQ\n");
+		pr_info("HIF_MIB_SET_REQ\n");
 		break;
 	case HIF_MIB_SET_CONF:
-		printk("HIF_MIB_SET_CONF\n");
+		pr_info("HIF_MIB_SET_CONF\n");
 		break;
 	case HIF_POWERMGT_REQ:
-		printk("HIF_POWERMGT_REQ\n");
+		pr_info("HIF_POWERMGT_REQ\n");
 		break;
 	case HIF_POWERMGT_CONF:
-		printk("HIF_POWERMGT_CONF\n");
+		pr_info("HIF_POWERMGT_CONF\n");
 		break;
 	case HIF_START_REQ:
-		printk("HIF_START_REQ\n");
+		pr_info("HIF_START_REQ\n");
 		break;
 	case HIF_START_CONF:
-		printk("HIF_START_CONF\n");
+		pr_info("HIF_START_CONF\n");
 		break;
 	case HIF_CONNECT_IND:
-		printk("HIF_CONNECT_IND\n");
+		pr_info("HIF_CONNECT_IND\n");
 		break;
 	case HIF_STOP_REQ:
-		printk("HIF_STOP_REQ\n");
+		pr_info("HIF_STOP_REQ\n");
 		break;
 	case HIF_STOP_CONF:
-		printk("HIF_STOP_CONF\n");
+		pr_info("HIF_STOP_CONF\n");
 		break;
 	case HIF_PS_ADH_SET_REQ:
-		printk("HIF_PS_ADH_SET_REQ\n");
+		pr_info("HIF_PS_ADH_SET_REQ\n");
 		break;
 	case HIF_PS_ADH_SET_CONF:
-		printk("HIF_PS_ADH_SET_CONF\n");
+		pr_info("HIF_PS_ADH_SET_CONF\n");
 		break;
 	case HIF_INFRA_SET_REQ:
-		printk("HIF_INFRA_SET_REQ\n");
+		pr_info("HIF_INFRA_SET_REQ\n");
 		break;
 	case HIF_INFRA_SET_CONF:
-		printk("HIF_INFRA_SET_CONF\n");
+		pr_info("HIF_INFRA_SET_CONF\n");
 		break;
 	case HIF_ADH_SET_REQ:
-		printk("HIF_ADH_SET_REQ\n");
+		pr_info("HIF_ADH_SET_REQ\n");
 		break;
 	case HIF_ADH_SET_CONF:
-		printk("HIF_ADH_SET_CONF\n");
+		pr_info("HIF_ADH_SET_CONF\n");
 		break;
 	case HIF_AP_SET_REQ:
-		printk("HIF_AP_SET_REQ\n");
+		pr_info("HIF_AP_SET_REQ\n");
 		break;
 	case HIF_AP_SET_CONF:
-		printk("HIF_AP_SET_CONF\n");
+		pr_info("HIF_AP_SET_CONF\n");
 		break;
 	case HIF_ASSOC_INFO_IND:
-		printk("HIF_ASSOC_INFO_IND\n");
+		pr_info("HIF_ASSOC_INFO_IND\n");
 		break;
 	case HIF_MIC_FAILURE_REQ:
-		printk("HIF_MIC_FAILURE_REQ\n");
+		pr_info("HIF_MIC_FAILURE_REQ\n");
 		break;
 	case HIF_MIC_FAILURE_CONF:
-		printk("HIF_MIC_FAILURE_CONF\n");
+		pr_info("HIF_MIC_FAILURE_CONF\n");
 		break;
 	case HIF_SCAN_REQ:
-		printk("HIF_SCAN_REQ\n");
+		pr_info("HIF_SCAN_REQ\n");
 		break;
 	case HIF_SCAN_CONF:
-		printk("HIF_SCAN_CONF\n");
+		pr_info("HIF_SCAN_CONF\n");
 		break;
 	case HIF_PHY_INFO_REQ:
-		printk("HIF_PHY_INFO_REQ\n");
+		pr_info("HIF_PHY_INFO_REQ\n");
 		break;
 	case HIF_PHY_INFO_CONF:
-		printk("HIF_PHY_INFO_CONF\n");
+		pr_info("HIF_PHY_INFO_CONF\n");
 		break;
 	case HIF_SLEEP_REQ:
-		printk("HIF_SLEEP_REQ\n");
+		pr_info("HIF_SLEEP_REQ\n");
 		break;
 	case HIF_SLEEP_CONF:
-		printk("HIF_SLEEP_CONF\n");
+		pr_info("HIF_SLEEP_CONF\n");
 		break;
 	case HIF_PHY_INFO_IND:
-		printk("HIF_PHY_INFO_IND\n");
+		pr_info("HIF_PHY_INFO_IND\n");
 		break;
 	case HIF_SCAN_IND:
-		printk("HIF_SCAN_IND\n");
+		pr_info("HIF_SCAN_IND\n");
 		break;
 	case HIF_INFRA_SET2_REQ:
-		printk("HIF_INFRA_SET2_REQ\n");
+		pr_info("HIF_INFRA_SET2_REQ\n");
 		break;
 	case HIF_INFRA_SET2_CONF:
-		printk("HIF_INFRA_SET2_CONF\n");
+		pr_info("HIF_INFRA_SET2_CONF\n");
 		break;
 	case HIF_ADH_SET2_REQ:
-		printk("HIF_ADH_SET2_REQ\n");
+		pr_info("HIF_ADH_SET2_REQ\n");
 		break;
 	case HIF_ADH_SET2_CONF:
-		printk("HIF_ADH_SET2_CONF\n");
+		pr_info("HIF_ADH_SET2_CONF\n");
 	}
 }
 
@@ -3330,7 +3330,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr)
 
 	priv->mac_address_valid = 0;
 	hostif_sme_enqueue(priv, SME_MACADDRESS_SET_REQUEST);
-	printk(KERN_INFO
+	netdev_info(dev,
 	       "ks_wlan: MAC ADDRESS = %02x:%02x:%02x:%02x:%02x:%02x\n",
 	       priv->eth_addr[0], priv->eth_addr[1], priv->eth_addr[2],
 	       priv->eth_addr[3], priv->eth_addr[4], priv->eth_addr[5]);
@@ -3362,7 +3362,7 @@ int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	DPRINTK(3, "in_interrupt()=%ld\n", in_interrupt());
 
 	if (!skb) {
-		printk(KERN_ERR "ks_wlan:  skb == NULL!!!\n");
+		netdev_err(dev, "ks_wlan:  skb == NULL!!!\n");
 		return 0;
 	}
 	if (priv->dev_state < DEVICE_STATE_READY) {
@@ -3428,7 +3428,7 @@ int ks_wlan_open(struct net_device *dev)
 	priv->cur_rx = 0;
 
 	if (!priv->mac_address_valid) {
-		printk(KERN_ERR "ks_wlan : %s Not READY !!\n", dev->name);
+		netdev_err(dev, "ks_wlan : %s Not READY !!\n", dev->name);
 		return -EBUSY;
 	} else
 		netif_start_queue(dev);
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk
  2016-09-23 21:33 [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk Georgiana Rodica Chelu
@ 2016-09-25 10:35 ` Greg KH
  2016-09-26  8:19   ` Georgiana Chelu
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2016-09-25 10:35 UTC (permalink / raw)
  To: Georgiana Rodica Chelu; +Cc: outreachy-kernel

On Sat, Sep 24, 2016 at 12:33:43AM +0300, Georgiana Rodica Chelu wrote:
> The checkpatch.pl script found the following warning:
> 
> WARNING: printk() should include KERN_ facility level
> 
> After adding the KERN_ facility level to printk(), the script showed
> another warning:
> 
> WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
> dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
> 
> The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion,
> use netdev_info(), netdev_err() or netdev_dbg() when there is
> a netdev device and use pr_info() in the remained cases.
> 
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> ---
> Changes in v2:
>         - make the commit message more clear
> 	- replace all the appearances of printk()
> 
>  drivers/staging/ks7010/ks_wlan_net.c | 92 ++++++++++++++++++------------------
>  1 file changed, 46 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index d13a06b..9ef44cc 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -233,9 +233,9 @@ static int ks_wlan_set_freq(struct net_device *dev,
>  		/* We should do a better check than that,
>  		 * based on the card capability !!! */
>  		if ((channel < 1) || (channel > 14)) {
> -			printk(KERN_DEBUG
> -			       "%s: New channel value of %d is invalid!\n",
> -			       dev->name, fwrq->m);
> +			netdev_dbg(dev,
> +				   "%s: New channel value of %d is invalid!\n",
> +				   dev->name, fwrq->m);
>  			rc = -EINVAL;
>  		} else {
>  			/* Yes ! We can set it !!! */
> @@ -2671,17 +2671,17 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev,
>  
>  	if (*uwrq == SLP_SLEEP) {
>  		priv->sleep_mode = *uwrq;
> -		printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
> +		netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
>  
>  		hostif_sme_enqueue(priv, SME_STOP_REQUEST);
>  		hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
>  
>  	} else if (*uwrq == SLP_ACTIVE) {
>  		priv->sleep_mode = *uwrq;
> -		printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
> +		netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
>  		hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
>  	} else {
> -		printk("SET_SLEEP_MODE %d errror\n", *uwrq);
> +		netdev_err(dev, "SET_SLEEP_MODE %d errror\n", *uwrq);
>  		return -EINVAL;
>  	}
>  
> @@ -2783,7 +2783,7 @@ static int ks_wlan_get_wps_enable(struct net_device *dev,
>  	}
>  	/* for SLEEP MODE */
>  	*uwrq = priv->wps.wps_enabled;
> -	printk("return=%d\n", *uwrq);
> +	netdev_info(dev, "return=%d\n", *uwrq);
>  
>  	return 0;
>  }
> @@ -2978,112 +2978,112 @@ static void print_hif_event(int event)
>  
>  	switch (event) {
>  	case HIF_DATA_REQ:
> -		printk("HIF_DATA_REQ\n");
> +		pr_info("HIF_DATA_REQ\n");
>  		break;
>  	case HIF_DATA_IND:
> -		printk("HIF_DATA_IND\n");
> +		pr_info("HIF_DATA_IND\n");

All of these should have a device structure somewhere, please fix this
function up to have that.  Right now I'd just take these changes out of
the patch and submit the rest.

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk
  2016-09-25 10:35 ` Greg KH
@ 2016-09-26  8:19   ` Georgiana Chelu
  2016-09-26  9:02     ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Georgiana Chelu @ 2016-09-26  8:19 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 4107 bytes --]

I submitted the third version of the patch. I had to change the title,
so the patch will not appear in this thread.

About the function static void print_hif_event(int event); I have
no clue how to find the device structure. Could you give me some hints?

Thank you,
Georgiana

On 25 September 2016 at 13:35, Greg KH <gregkh@linuxfoundation.org> wrote:

> On Sat, Sep 24, 2016 at 12:33:43AM +0300, Georgiana Rodica Chelu wrote:
> > The checkpatch.pl script found the following warning:
> >
> > WARNING: printk() should include KERN_ facility level
> >
> > After adding the KERN_ facility level to printk(), the script showed
> > another warning:
> >
> > WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
> > dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
> >
> > The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion,
> > use netdev_info(), netdev_err() or netdev_dbg() when there is
> > a netdev device and use pr_info() in the remained cases.
> >
> > Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
> > ---
> > Changes in v2:
> >         - make the commit message more clear
> >       - replace all the appearances of printk()
> >
> >  drivers/staging/ks7010/ks_wlan_net.c | 92
> ++++++++++++++++++------------------
> >  1 file changed, 46 insertions(+), 46 deletions(-)
> >
> > diff --git a/drivers/staging/ks7010/ks_wlan_net.c
> b/drivers/staging/ks7010/ks_wlan_net.c
> > index d13a06b..9ef44cc 100644
> > --- a/drivers/staging/ks7010/ks_wlan_net.c
> > +++ b/drivers/staging/ks7010/ks_wlan_net.c
> > @@ -233,9 +233,9 @@ static int ks_wlan_set_freq(struct net_device *dev,
> >               /* We should do a better check than that,
> >                * based on the card capability !!! */
> >               if ((channel < 1) || (channel > 14)) {
> > -                     printk(KERN_DEBUG
> > -                            "%s: New channel value of %d is invalid!\n",
> > -                            dev->name, fwrq->m);
> > +                     netdev_dbg(dev,
> > +                                "%s: New channel value of %d is
> invalid!\n",
> > +                                dev->name, fwrq->m);
> >                       rc = -EINVAL;
> >               } else {
> >                       /* Yes ! We can set it !!! */
> > @@ -2671,17 +2671,17 @@ static int ks_wlan_set_sleep_mode(struct
> net_device *dev,
> >
> >       if (*uwrq == SLP_SLEEP) {
> >               priv->sleep_mode = *uwrq;
> > -             printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
> > +             netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
> >
> >               hostif_sme_enqueue(priv, SME_STOP_REQUEST);
> >               hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
> >
> >       } else if (*uwrq == SLP_ACTIVE) {
> >               priv->sleep_mode = *uwrq;
> > -             printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
> > +             netdev_info(dev, "SET_SLEEP_MODE %d\n", priv->sleep_mode);
> >               hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
> >       } else {
> > -             printk("SET_SLEEP_MODE %d errror\n", *uwrq);
> > +             netdev_err(dev, "SET_SLEEP_MODE %d errror\n", *uwrq);
> >               return -EINVAL;
> >       }
> >
> > @@ -2783,7 +2783,7 @@ static int ks_wlan_get_wps_enable(struct
> net_device *dev,
> >       }
> >       /* for SLEEP MODE */
> >       *uwrq = priv->wps.wps_enabled;
> > -     printk("return=%d\n", *uwrq);
> > +     netdev_info(dev, "return=%d\n", *uwrq);
> >
> >       return 0;
> >  }
> > @@ -2978,112 +2978,112 @@ static void print_hif_event(int event)
> >
> >       switch (event) {
> >       case HIF_DATA_REQ:
> > -             printk("HIF_DATA_REQ\n");
> > +             pr_info("HIF_DATA_REQ\n");
> >               break;
> >       case HIF_DATA_IND:
> > -             printk("HIF_DATA_IND\n");
> > +             pr_info("HIF_DATA_IND\n");
>
> All of these should have a device structure somewhere, please fix this
> function up to have that.  Right now I'd just take these changes out of
> the patch and submit the rest.
>
> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 5699 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] Re: [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk
  2016-09-26  8:19   ` Georgiana Chelu
@ 2016-09-26  9:02     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-09-26  9:02 UTC (permalink / raw)
  To: Georgiana Chelu; +Cc: Greg KH, outreachy-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 5798 bytes --]



On Mon, 26 Sep 2016, Georgiana Chelu wrote:

> I submitted the third version of the patch. I had to change the title,
> so the patch will not appear in this thread.
>
> About the function static void print_hif_event(int event); I have
> no clue how to find the device structure. Could you give me some hints?

Look at the call sites of print_hif_event and see if there is some
argument you could add that would provide the needed information.

julia

>
> Thank you,
> Georgiana
>
> On 25 September 2016 at 13:35, Greg KH <gregkh@linuxfoundation.org> wrote:
>       On Sat, Sep 24, 2016 at 12:33:43AM +0300, Georgiana Rodica Chelu
>       wrote:
>       > The checkpatch.pl script found the following warning:
>       >
>       > WARNING: printk() should include KERN_ facility level
>       >
>       > After adding the KERN_ facility level to printk(), the script
>       showed
>       > another warning:
>       >
>       > WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev,
>       ... then
>       > dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
>       >
>       > The warning is similar for KERN_ERR and KERN_DEBUG. In
>       conclusion,
>       > use netdev_info(), netdev_err() or netdev_dbg() when there is
>       > a netdev device and use pr_info() in the remained cases.
>       >
>       > Signed-off-by: Georgiana Rodica Chelu
>       <georgiana.chelu93@gmail.com>
>       > ---
>       > Changes in v2:
>       >         - make the commit message more clear
>       >       - replace all the appearances of printk()
>       >
>       >  drivers/staging/ks7010/ks_wlan_net.c | 92
>       ++++++++++++++++++------------------
>       >  1 file changed, 46 insertions(+), 46 deletions(-)
>       >
>       > diff --git a/drivers/staging/ks7010/ks_wlan_net.c
>       b/drivers/staging/ks7010/ks_wlan_net.c
>       > index d13a06b..9ef44cc 100644
>       > --- a/drivers/staging/ks7010/ks_wlan_net.c
>       > +++ b/drivers/staging/ks7010/ks_wlan_net.c
>       > @@ -233,9 +233,9 @@ static int ks_wlan_set_freq(struct
>       net_device *dev,
>       >               /* We should do a better check than that,
>       >                * based on the card capability !!! */
>       >               if ((channel < 1) || (channel > 14)) {
>       > -                     printk(KERN_DEBUG
>       > -                            "%s: New channel value of %d is
>       invalid!\n",
>       > -                            dev->name, fwrq->m);
>       > +                     netdev_dbg(dev,
>       > +                                "%s: New channel value of %d
>       is invalid!\n",
>       > +                                dev->name, fwrq->m);
>       >                       rc = -EINVAL;
>       >               } else {
>       >                       /* Yes ! We can set it !!! */
>       > @@ -2671,17 +2671,17 @@ static int
>       ks_wlan_set_sleep_mode(struct net_device *dev,
>       >
>       >       if (*uwrq == SLP_SLEEP) {
>       >               priv->sleep_mode = *uwrq;
>       > -             printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
>       > +             netdev_info(dev, "SET_SLEEP_MODE %d\n",
>       priv->sleep_mode);
>       >
>       >               hostif_sme_enqueue(priv, SME_STOP_REQUEST);
>       >               hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
>       >
>       >       } else if (*uwrq == SLP_ACTIVE) {
>       >               priv->sleep_mode = *uwrq;
>       > -             printk("SET_SLEEP_MODE %d\n", priv->sleep_mode);
>       > +             netdev_info(dev, "SET_SLEEP_MODE %d\n",
>       priv->sleep_mode);
>       >               hostif_sme_enqueue(priv, SME_SLEEP_REQUEST);
>       >       } else {
>       > -             printk("SET_SLEEP_MODE %d errror\n", *uwrq);
>       > +             netdev_err(dev, "SET_SLEEP_MODE %d errror\n",
>       *uwrq);
>       >               return -EINVAL;
>       >       }
>       >
>       > @@ -2783,7 +2783,7 @@ static int ks_wlan_get_wps_enable(struct
>       net_device *dev,
>       >       }
>       >       /* for SLEEP MODE */
>       >       *uwrq = priv->wps.wps_enabled;
>       > -     printk("return=%d\n", *uwrq);
>       > +     netdev_info(dev, "return=%d\n", *uwrq);
>       >
>       >       return 0;
>       >  }
>       > @@ -2978,112 +2978,112 @@ static void print_hif_event(int
>       event)
>       >
>       >       switch (event) {
>       >       case HIF_DATA_REQ:
>       > -             printk("HIF_DATA_REQ\n");
>       > +             pr_info("HIF_DATA_REQ\n");
>       >               break;
>       >       case HIF_DATA_IND:
>       > -             printk("HIF_DATA_IND\n");
>       > +             pr_info("HIF_DATA_IND\n");
>
> All of these should have a device structure somewhere, please fix this
> function up to have that.  Right now I'd just take these changes out
> of
> the patch and submit the rest.
>
> thanks,
>
> greg k-h
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CALta04y3Z_12G_7Gcv%3D65
> Z9Qb1Hc8UkJ0B4UMVfjQZz9HuKhxw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-26  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 21:33 [PATCH v2] staging: ks7010: ks_wlan_net: Use netdev_ or pr_info instead of printk Georgiana Rodica Chelu
2016-09-25 10:35 ` Greg KH
2016-09-26  8:19   ` Georgiana Chelu
2016-09-26  9:02     ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.