All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Lucas Tanure <tanure@linux.com>, Shradha Shah <sshah@solarflare.com>
Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sfc: Replace memset with eth_zero_addr
Date: Wed, 20 Jan 2016 14:44:08 +0300	[thread overview]
Message-ID: <569F7308.9060008@cogentembedded.com> (raw)
In-Reply-To: <1453246074-1054-1-git-send-email-tanure@linux.com>

Hello.

On 1/20/2016 2:27 AM, Lucas Tanure wrote:

> Use eth_zero_addr to assign the zero address to the given address array
> instead of memset when second argument is address of zero.

    What address? memset() takes just 1 address. :-)

> Signed-off-by: Lucas Tanure <tanure@linux.com>
> ---
>   drivers/net/ethernet/sfc/ef10_sriov.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
> index 3c17f27..10f60db 100644
> --- a/drivers/net/ethernet/sfc/ef10_sriov.c
> +++ b/drivers/net/ethernet/sfc/ef10_sriov.c
> @@ -527,7 +527,7 @@ int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, u8 *mac)
>   	return 0;
>
>   fail:
> -	memset(vf->mac, 0, ETH_ALEN);
> +	eth_zero_addr(vf->mac);
>   	return rc;
>   }
>

MBR, Sergei

  parent reply	other threads:[~2016-01-20 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 23:27 [PATCH] sfc: Replace memset with eth_zero_addr Lucas Tanure
2016-01-20  9:44 ` Bert Kenward
2016-01-20 10:25   ` David Miller
2016-01-20 11:44 ` Sergei Shtylyov [this message]
2016-01-20 11:49   ` Lucas Tanure
  -- strict thread matches above, loose matches on Subject: below --
2017-01-16  3:56 Shyam Saini
2017-01-16  9:35 ` Edward Cree
2017-01-16 16:47   ` 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=569F7308.9060008@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=sshah@solarflare.com \
    --cc=tanure@linux.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 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.