Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312580 > unrolled thread
| Started by | Lucas Tanure <tanure@linux.com> |
|---|---|
| First post | 2016-01-20 00:30 +0100 |
| Last post | 2016-01-20 12:50 +0100 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] sfc: Replace memset with eth_zero_addr Lucas Tanure <tanure@linux.com> - 2016-01-20 00:30 +0100
Re: [PATCH] sfc: Replace memset with eth_zero_addr Bert Kenward <bkenward@solarflare.com> - 2016-01-20 11:00 +0100
Re: [PATCH] sfc: Replace memset with eth_zero_addr David Miller <davem@davemloft.net> - 2016-01-20 11:30 +0100
Re: [PATCH] sfc: Replace memset with eth_zero_addr Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-01-20 12:50 +0100
Re: [PATCH] sfc: Replace memset with eth_zero_addr Lucas Tanure <tanure@linux.com> - 2016-01-20 12:50 +0100
| From | Lucas Tanure <tanure@linux.com> |
|---|---|
| Date | 2016-01-20 00:30 +0100 |
| Subject | [PATCH] sfc: Replace memset with eth_zero_addr |
| Message-ID | <qSNSO-6gl-19@gated-at.bofh.it> |
Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. 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; } -- 2.7.0
[toc] | [next] | [standalone]
| From | Bert Kenward <bkenward@solarflare.com> |
|---|---|
| Date | 2016-01-20 11:00 +0100 |
| Message-ID | <qSXIu-4Bq-1@gated-at.bofh.it> |
| In reply to | #1312580 |
On 19/01/16 23:27, 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. > > Signed-off-by: Lucas Tanure <tanure@linux.com> > --- Acked-by: Bert Kenward <bkenward@solarflare.com> ... although net-next is still closed I think. -- Bert Kenward <bkenward@solarflare.com> Software Engineer, Solarflare
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-01-20 11:30 +0100 |
| Message-ID | <qSYbx-51L-35@gated-at.bofh.it> |
| In reply to | #1313044 |
From: Bert Kenward <bkenward@solarflare.com> Date: Wed, 20 Jan 2016 09:44:30 +0000 > On 19/01/16 23:27, 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. >> >> Signed-off-by: Lucas Tanure <tanure@linux.com> >> --- > > Acked-by: Bert Kenward <bkenward@solarflare.com> > > ... although net-next is still closed I think. Correct.
[toc] | [prev] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2016-01-20 12:50 +0100 |
| Message-ID | <qSZqV-5Mi-11@gated-at.bofh.it> |
| In reply to | #1312580 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lucas Tanure <tanure@linux.com> |
|---|---|
| Date | 2016-01-20 12:50 +0100 |
| Message-ID | <qSZqW-5Mi-13@gated-at.bofh.it> |
| In reply to | #1313151 |
Hi, On Wed, Jan 20, 2016 at 9:44 AM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > 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. :-) I mean the vf->mac, a pointer to a six-byte array containing the Ethernet 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 > Thanks, Tanure
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web