netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg <gvrose8192@gmail.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: davem@davemloft.net, Xin Long <lucien.xin@gmail.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com
Subject: Re: [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val
Date: Wed, 29 Jun 2016 09:38:59 -0700	[thread overview]
Message-ID: <1467218339.3404.4.camel@gmail.com> (raw)
In-Reply-To: <1467217804-137463-3-git-send-email-jeffrey.t.kirsher@intel.com>

On Wed, 2016-06-29 at 09:30 -0700, Jeff Kirsher wrote:
> From: Xin Long <lucien.xin@gmail.com>
> 
> Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative
> return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(),
> it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta,
> and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we
> should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX.

I believe "initiative" should be "initial", "cause" should be "because"
and "it use err" should be "it uses err".  And I won't be a grammar nazi
about all the commas.

- Greg

> 
> With this fix, the other functions that called it also can work well,
> cause they only care about if err is 0 or not.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.c b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> index 61a80da..2819abc 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/mbx.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> @@ -85,7 +85,7 @@ static s32 ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
>  static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
>  {
>  	struct ixgbe_mbx_info *mbx = &hw->mbx;
> -	s32 ret_val = -IXGBE_ERR_MBX;
> +	s32 ret_val = IXGBE_ERR_MBX;
>  
>  	if (!mbx->ops.read)
>  		goto out;
> @@ -111,7 +111,7 @@ out:
>  static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
>  {
>  	struct ixgbe_mbx_info *mbx = &hw->mbx;
> -	s32 ret_val = -IXGBE_ERR_MBX;
> +	s32 ret_val = IXGBE_ERR_MBX;
>  
>  	/* exit if either we can't write or there isn't a defined timeout */
>  	if (!mbx->ops.write || !mbx->timeout)

  reply	other threads:[~2016-06-29 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 16:30 [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
2016-06-29 16:30 ` [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync Jeff Kirsher
2016-06-29 16:30 ` [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Jeff Kirsher
2016-06-29 16:38   ` Greg [this message]
2016-06-30 12:57 ` [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467218339.3404.4.camel@gmail.com \
    --to=gvrose8192@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jogreene@redhat.com \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).