All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: "Hatice ERTÜRK" <haticeerturk27@gmail.com>,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8723au: core: coding style ether_addr_copy
Date: Sun, 22 Feb 2015 14:50:10 -0500	[thread overview]
Message-ID: <54EA32F2.8090602@gmail.com> (raw)
In-Reply-To: <1424628253-15398-1-git-send-email-haticeerturk27@gmail.com>

On 02/22/15 13:04, Hatice ERTÜRK wrote:
> This fixes the following issues detected by checkpatch.pl:
> 
> WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
> 
> Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
> ---
>  drivers/staging/rtl8723au/core/rtw_ap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Seems fine - did you verify that the structures are aligned correctly?

Cheers,
Jes


> diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
> index 59d08f4..04717dc 100644
> --- a/drivers/staging/rtl8723au/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723au/core/rtw_ap.c
> @@ -817,7 +817,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
>  
>  	pbss_network->Rssi = 0;
>  
> -	memcpy(pbss_network->MacAddress, myid(&padapter->eeprompriv), ETH_ALEN);
> +	ether_addr_copy(pbss_network->MacAddress, myid(&padapter->eeprompriv));
>  
>  	/* SSID */
>  	p = rtw_get_ie23a(ie, WLAN_EID_SSID, &ie_len, pbss_network->IELength);
> @@ -1079,7 +1079,7 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr)
>  		if (!paclnode->valid) {
>  			INIT_LIST_HEAD(&paclnode->list);
>  
> -			memcpy(paclnode->addr, addr, ETH_ALEN);
> +			ether_addr_copy(paclnode->addr, addr);
>  
>  			paclnode->valid = true;
>  
> 



      reply	other threads:[~2015-02-22 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22 18:04 [PATCH] Staging: rtl8723au: core: coding style ether_addr_copy Hatice ERTÜRK
2015-02-22 19:50 ` Jes Sorensen [this message]

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=54EA32F2.8090602@gmail.com \
    --to=jes.sorensen@gmail.com \
    --cc=haticeerturk27@gmail.com \
    --cc=outreachy-kernel@googlegroups.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.