netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 00/14 v2] 05/14 respun.
@ 2014-02-20  3:49 Aaron Brown
  2014-02-20  3:49 ` [net-next 05/14 v2] i40evf: fix up strings in init task Aaron Brown
  2014-02-20  6:23 ` [net-next 00/14 v2] 05/14 respun David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Aaron Brown @ 2014-02-20  3:49 UTC (permalink / raw)
  To: davem; +Cc: Aaron Brown, netdev, gospo, sassmann

Patch 05/14 of the series was updated to address concerns from Joe Perches.
The rest of the series remains the same.

Mitch Williams (1):
  05/14 v2 i40evf: fix up strings in init task

 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 36 +++++++++++--------------
 1 file changed, 16 insertions(+), 20 deletions(-)

-- 
1.8.5.GIT

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

* [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  3:49 [net-next 00/14 v2] 05/14 respun Aaron Brown
@ 2014-02-20  3:49 ` Aaron Brown
  2014-02-20  4:09   ` Joe Perches
  2014-02-20  6:23 ` [net-next 00/14 v2] 05/14 respun David Miller
  1 sibling, 1 reply; 8+ messages in thread
From: Aaron Brown @ 2014-02-20  3:49 UTC (permalink / raw)
  To: davem
  Cc: Mitch Williams, netdev, gospo, sassmann, joe, Jesse Brandeburg,
	Aaron Brown

From: Mitch Williams <mitch.a.williams@intel.com>

Make sure errors are reported at the correct log level, quit printing
the function name every time, and make the messages more consistent in
format.

v2: Removed unnecessary periods and redundant OOM message.

Change-ID: I50e443467519ad3850def131d84626c50612c611
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 36 +++++++++++--------------
 1 file changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index fe2271e..7419ad9 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1927,14 +1927,14 @@ static void i40evf_init_task(struct work_struct *work)
 		adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
 		err = i40e_set_mac_type(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: set_mac_type failed: %d\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Failed to set MAC type (%d)\n",
+				err);
 		goto err;
 		}
 		err = i40evf_check_reset_complete(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: device is still in reset (%d).\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Device is still in reset (%d)\n",
+				err);
 			goto err;
 		}
 		hw->aq.num_arq_entries = I40EVF_AQ_LEN;
@@ -1944,14 +1944,14 @@ static void i40evf_init_task(struct work_struct *work)
 
 		err = i40evf_init_adminq(hw);
 		if (err) {
-			dev_info(&pdev->dev, "%s: init_adminq failed: %d\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Failed to init Admin Queue (%d)\n",
+				err);
 			goto err;
 		}
 		err = i40evf_send_api_ver(adapter);
 		if (err) {
-			dev_info(&pdev->dev, "%s: unable to send to PF (%d)\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Unable to send to PF (%d)\n",
+				err);
 			i40evf_shutdown_adminq(hw);
 			goto err;
 		}
@@ -1965,13 +1965,13 @@ static void i40evf_init_task(struct work_struct *work)
 		/* aq msg sent, awaiting reply */
 		err = i40evf_verify_api_ver(adapter);
 		if (err) {
-			dev_err(&pdev->dev, "Unable to verify API version, error %d\n",
+			dev_err(&pdev->dev, "Unable to verify API version (%d)\n",
 				err);
 			goto err;
 		}
 		err = i40evf_send_vf_config_msg(adapter);
 		if (err) {
-			dev_err(&pdev->dev, "Unable send config request, error %d\n",
+			dev_err(&pdev->dev, "Unable send config request (%d)\n",
 				err);
 			goto err;
 		}
@@ -1985,18 +1985,15 @@ static void i40evf_init_task(struct work_struct *work)
 				(I40E_MAX_VF_VSI *
 				 sizeof(struct i40e_virtchnl_vsi_resource));
 			adapter->vf_res = kzalloc(bufsz, GFP_KERNEL);
-			if (!adapter->vf_res) {
-				dev_err(&pdev->dev, "%s: unable to allocate memory\n",
-					__func__);
+			if (!adapter->vf_res)
 				goto err;
-			}
 		}
 		err = i40evf_get_vf_config(adapter);
 		if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK)
 			goto restart;
 		if (err) {
-			dev_info(&pdev->dev, "%s: unable to get VF config (%d)\n",
-				__func__, err);
+			dev_err(&pdev->dev, "Unable to get VF config (%d)\n",
+				err);
 			goto err_alloc;
 		}
 		adapter->state = __I40EVF_INIT_SW;
@@ -2010,7 +2007,7 @@ static void i40evf_init_task(struct work_struct *work)
 			adapter->vsi_res = &adapter->vf_res->vsi_res[i];
 	}
 	if (!adapter->vsi_res) {
-		dev_info(&pdev->dev, "%s: no LAN VSI found\n", __func__);
+		dev_err(&pdev->dev, "No LAN VSI found\n");
 		goto err_alloc;
 	}
 
@@ -2041,9 +2038,8 @@ static void i40evf_init_task(struct work_struct *work)
 
 	/* The HW MAC address was set and/or determined in sw_init */
 	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
-		dev_info(&pdev->dev,
-			"Invalid MAC address %pMAC, using random\n",
-			adapter->hw.mac.addr);
+		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n",
+			 adapter->hw.mac.addr);
 		random_ether_addr(adapter->hw.mac.addr);
 	}
 	memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len);
-- 
1.8.5.GIT

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

* Re: [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  3:49 ` [net-next 05/14 v2] i40evf: fix up strings in init task Aaron Brown
@ 2014-02-20  4:09   ` Joe Perches
  2014-02-20  4:51     ` Aaron Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2014-02-20  4:09 UTC (permalink / raw)
  To: Aaron Brown
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg

On Wed, 2014-02-19 at 19:49 -0800, Aaron Brown wrote:
> Make sure errors are reported at the correct log level, quit printing
> the function name every time, and make the messages more consistent in
> format.
[]
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
[]
> @@ -2041,9 +2038,8 @@ static void i40evf_init_task(struct work_struct *work)
>  
>  	/* The HW MAC address was set and/or determined in sw_init */
>  	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
> -		dev_info(&pdev->dev,
> -			"Invalid MAC address %pMAC, using random\n",
> -			adapter->hw.mac.addr);
> +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n",
> +			 adapter->hw.mac.addr);

The "AC" after %pM is superfluous.

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

* Re: [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  4:09   ` Joe Perches
@ 2014-02-20  4:51     ` Aaron Brown
  2014-02-20  4:58       ` Joe Perches
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron Brown @ 2014-02-20  4:51 UTC (permalink / raw)
  To: Joe Perches
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg

On Wed, 2014-02-19 at 20:09 -0800, Joe Perches wrote:
> On Wed, 2014-02-19 at 19:49 -0800, Aaron Brown wrote:
> > Make sure errors are reported at the correct log level, quit printing
> > the function name every time, and make the messages more consistent in
> > format.
> []
> > diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> []
> > @@ -2041,9 +2038,8 @@ static void i40evf_init_task(struct work_struct *work)
> >  
> >  	/* The HW MAC address was set and/or determined in sw_init */
> >  	if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
> > -		dev_info(&pdev->dev,
> > -			"Invalid MAC address %pMAC, using random\n",
> > -			adapter->hw.mac.addr);
> > +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n",
> > +			 adapter->hw.mac.addr);
> 
> The "AC" after %pM is superfluous.

Thanks Joe, guess I'll be making another spin...

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

* Re: [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  4:51     ` Aaron Brown
@ 2014-02-20  4:58       ` Joe Perches
  2014-02-20  5:16         ` Aaron Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2014-02-20  4:58 UTC (permalink / raw)
  To: Aaron Brown
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg

On Wed, 2014-02-19 at 20:51 -0800, Aaron Brown wrote:
> On Wed, 2014-02-19 at 20:09 -0800, Joe Perches wrote:
> > On Wed, 2014-02-19 at 19:49 -0800, Aaron Brown wrote:
> > > Make sure errors are reported at the correct log level, quit printing
> > > the function name every time, and make the messages more consistent in
> > > format.
> > []
> > > diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
[]
> > +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n",
> > > +			 adapter->hw.mac.addr);
> > The "AC" after %pM is superfluous.
> Thanks Joe, guess I'll be making another spin...

Or send another patch after this one because there
are 2 %pMAC uses in i40evf_main.c

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

* Re: [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  4:58       ` Joe Perches
@ 2014-02-20  5:16         ` Aaron Brown
  2014-02-20 16:20           ` Williams, Mitch A
  0 siblings, 1 reply; 8+ messages in thread
From: Aaron Brown @ 2014-02-20  5:16 UTC (permalink / raw)
  To: Joe Perches
  Cc: davem, Mitch Williams, netdev, gospo, sassmann, Jesse Brandeburg

On Wed, 2014-02-19 at 20:58 -0800, Joe Perches wrote:
> On Wed, 2014-02-19 at 20:51 -0800, Aaron Brown wrote:
> > On Wed, 2014-02-19 at 20:09 -0800, Joe Perches wrote:
> > > On Wed, 2014-02-19 at 19:49 -0800, Aaron Brown wrote:
> > > > Make sure errors are reported at the correct log level, quit printing
> > > > the function name every time, and make the messages more consistent in
> > > > format.
> > > []
> > > > diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> []
> > > +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n",
> > > > +			 adapter->hw.mac.addr);
> > > The "AC" after %pM is superfluous.
> > Thanks Joe, guess I'll be making another spin...
> 
> Or send another patch after this one because there
> are 2 %pMAC uses in i40evf_main.c

That works.  I'll bug Mitch to look for them when he does a hunt for other OOM messages that he said he'd do and send them up later.  So I guess this patch can stand for now.

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

* Re: [net-next 00/14 v2] 05/14 respun.
  2014-02-20  3:49 [net-next 00/14 v2] 05/14 respun Aaron Brown
  2014-02-20  3:49 ` [net-next 05/14 v2] i40evf: fix up strings in init task Aaron Brown
@ 2014-02-20  6:23 ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2014-02-20  6:23 UTC (permalink / raw)
  To: aaron.f.brown; +Cc: netdev, gospo, sassmann

From: Aaron Brown <aaron.f.brown@intel.com>
Date: Wed, 19 Feb 2014 19:49:37 -0800

> Patch 05/14 of the series was updated to address concerns from Joe Perches.
> The rest of the series remains the same.

When you update any part of a series, you must repost the entire
series.

Thank you.

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

* RE: [net-next 05/14 v2] i40evf: fix up strings in init task
  2014-02-20  5:16         ` Aaron Brown
@ 2014-02-20 16:20           ` Williams, Mitch A
  0 siblings, 0 replies; 8+ messages in thread
From: Williams, Mitch A @ 2014-02-20 16:20 UTC (permalink / raw)
  To: Brown, Aaron F, Joe Perches
  Cc: davem, netdev, gospo, sassmann, Brandeburg, Jesse



> -----Original Message-----
> From: Brown, Aaron F
> Sent: Wednesday, February 19, 2014 9:16 PM
> To: Joe Perches
> Cc: davem@davemloft.net; Williams, Mitch A; netdev@vger.kernel.org;
> gospo@redhat.com; sassmann@redhat.com; Brandeburg, Jesse
> Subject: Re: [net-next 05/14 v2] i40evf: fix up strings in init task
> 
> On Wed, 2014-02-19 at 20:58 -0800, Joe Perches wrote:
> > On Wed, 2014-02-19 at 20:51 -0800, Aaron Brown wrote:
> > > On Wed, 2014-02-19 at 20:09 -0800, Joe Perches wrote:
> > > > On Wed, 2014-02-19 at 19:49 -0800, Aaron Brown wrote:
> > > > > Make sure errors are reported at the correct log level, quit
> printing
> > > > > the function name every time, and make the messages more consistent
> in
> > > > > format.
> > > > []
> > > > > diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> > []
> > > > +		dev_info(&pdev->dev, "Invalid MAC address %pMAC, using
> random\n",
> > > > > +			 adapter->hw.mac.addr);
> > > > The "AC" after %pM is superfluous.
> > > Thanks Joe, guess I'll be making another spin...
> >
> > Or send another patch after this one because there
> > are 2 %pMAC uses in i40evf_main.c
> 
> That works.  I'll bug Mitch to look for them when he does a hunt for other
> OOM messages that he said he'd do and send them up later.  So I guess this
> patch can stand for now.
> 

Added it to my to-do list. Thanks again, Joe.

-Mitch


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

end of thread, other threads:[~2014-02-20 16:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20  3:49 [net-next 00/14 v2] 05/14 respun Aaron Brown
2014-02-20  3:49 ` [net-next 05/14 v2] i40evf: fix up strings in init task Aaron Brown
2014-02-20  4:09   ` Joe Perches
2014-02-20  4:51     ` Aaron Brown
2014-02-20  4:58       ` Joe Perches
2014-02-20  5:16         ` Aaron Brown
2014-02-20 16:20           ` Williams, Mitch A
2014-02-20  6:23 ` [net-next 00/14 v2] 05/14 respun David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).