All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
@ 2015-05-18 16:32 Jagan Teki
  2015-05-20 18:41 ` Jagan Teki
  0 siblings, 1 reply; 6+ messages in thread
From: Jagan Teki @ 2015-05-18 16:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: devel, Dan Carpenter, Jagan Teki, Greg Kroah-Hartman,
	Larry Finger, Florian Schilhabel

Fixes Warning encounter this by applying checkpatch.pl against this file:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

pahole output for respective structures:
- addr->sa_data
struct sockaddr {
	sa_family_t                sa_family;            /*     0     2 */
	char                       sa_data[14];          /*     2    14 */

	/* size: 16, cachelines: 1, members: 2 */
	/* last cacheline: 16 bytes */
};

- pnetdev->dev_addr
dev_addr is interface address infor from generic net_device structure
which is properly aligned and have some patches with this change as well.
"staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
(sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
---
Changes for v3:
	- Removed unaligned conversions
Changes for v2:
	- Describe a changelog, to prove address are aligned

 drivers/staging/rtl8712/os_intfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 6e776e5..d5f4c4d 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -181,7 +181,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p)
 	struct sockaddr *addr = p;
 
 	if (padapter->bup == false)
-		memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN);
+		ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
 	return 0;
 }
 
-- 
1.9.1


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

* Re: [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
  2015-05-18 16:32 [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy() Jagan Teki
@ 2015-05-20 18:41 ` Jagan Teki
  2015-05-20 19:31   ` Dan Carpenter
  2015-05-20 19:40   ` Larry Finger
  0 siblings, 2 replies; 6+ messages in thread
From: Jagan Teki @ 2015-05-20 18:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: devel, Florian Schilhabel, Greg Kroah-Hartman, Dan Carpenter,
	Larry Finger

On 18 May 2015 at 22:02, Jagan Teki <jteki@openedev.com> wrote:
> Fixes Warning encounter this by applying checkpatch.pl against this file:
> Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
> are __aligned(2)
>
> pahole output for respective structures:
> - addr->sa_data
> struct sockaddr {
>         sa_family_t                sa_family;            /*     0     2 */
>         char                       sa_data[14];          /*     2    14 */
>
>         /* size: 16, cachelines: 1, members: 2 */
>         /* last cacheline: 16 bytes */
> };
>
> - pnetdev->dev_addr
> dev_addr is interface address infor from generic net_device structure
> which is properly aligned and have some patches with this change as well.
> "staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
> (sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)
>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
> ---
> Changes for v3:
>         - Removed unaligned conversions
> Changes for v2:
>         - Describe a changelog, to prove address are aligned
>
>  drivers/staging/rtl8712/os_intfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
> index 6e776e5..d5f4c4d 100644
> --- a/drivers/staging/rtl8712/os_intfs.c
> +++ b/drivers/staging/rtl8712/os_intfs.c
> @@ -181,7 +181,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p)
>         struct sockaddr *addr = p;
>
>         if (padapter->bup == false)
> -               memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN);
> +               ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
>         return 0;
>  }
>
> --

Ping!

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

* Re: [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
  2015-05-20 18:41 ` Jagan Teki
@ 2015-05-20 19:31   ` Dan Carpenter
  2015-05-20 19:40   ` Larry Finger
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-05-20 19:31 UTC (permalink / raw)
  To: Jagan Teki
  Cc: linux-kernel, devel, Florian Schilhabel, Greg Kroah-Hartman,
	Larry Finger

On Thu, May 21, 2015 at 12:11:46AM +0530, Jagan Teki wrote:
> Ping!

No answer means that Greg hasn't gotten to it yet and no one else has
an issue with it.  Wait for 2 weeks before asking or 4 weeks if a merge
window is open.

regards,
dan carpenter

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

* Re: [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
  2015-05-20 18:41 ` Jagan Teki
  2015-05-20 19:31   ` Dan Carpenter
@ 2015-05-20 19:40   ` Larry Finger
  2015-05-20 19:46     ` Jagan Teki
  1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2015-05-20 19:40 UTC (permalink / raw)
  To: Jagan Teki, linux-kernel
  Cc: devel, Florian Schilhabel, Greg Kroah-Hartman, Dan Carpenter

On 05/20/2015 01:41 PM, Jagan Teki wrote:
> On 18 May 2015 at 22:02, Jagan Teki <jteki@openedev.com> wrote:
>> Fixes Warning encounter this by applying checkpatch.pl against this file:
>> Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
>> are __aligned(2)
>>
>> pahole output for respective structures:
>> - addr->sa_data
>> struct sockaddr {
>>          sa_family_t                sa_family;            /*     0     2 */
>>          char                       sa_data[14];          /*     2    14 */
>>
>>          /* size: 16, cachelines: 1, members: 2 */
>>          /* last cacheline: 16 bytes */
>> };
>>
>> - pnetdev->dev_addr
>> dev_addr is interface address infor from generic net_device structure
>> which is properly aligned and have some patches with this change as well.
>> "staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
>> (sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)
>>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Larry Finger <Larry.Finger@lwfinger.net>
>> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
>> ---
>> Changes for v3:
>>          - Removed unaligned conversions
>> Changes for v2:
>>          - Describe a changelog, to prove address are aligned
>>
>>   drivers/staging/rtl8712/os_intfs.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
>> index 6e776e5..d5f4c4d 100644
>> --- a/drivers/staging/rtl8712/os_intfs.c
>> +++ b/drivers/staging/rtl8712/os_intfs.c
>> @@ -181,7 +181,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p)
>>          struct sockaddr *addr = p;
>>
>>          if (padapter->bup == false)
>> -               memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN);
>> +               ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
>>          return 0;
>>   }
>>
>> --
>
> Ping!

Ah. Not only are you ignorant, but you are also rude! The patch was not NACKed, 
thus it will be picked up in good time.

Larry



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

* Re: [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
  2015-05-20 19:40   ` Larry Finger
@ 2015-05-20 19:46     ` Jagan Teki
  2015-05-20 19:57       ` Larry Finger
  0 siblings, 1 reply; 6+ messages in thread
From: Jagan Teki @ 2015-05-20 19:46 UTC (permalink / raw)
  To: Larry Finger
  Cc: linux-kernel, devel, Florian Schilhabel, Dan Carpenter,
	Greg Kroah-Hartman

On 21 May 2015 at 01:10, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 05/20/2015 01:41 PM, Jagan Teki wrote:
>>
>> On 18 May 2015 at 22:02, Jagan Teki <jteki@openedev.com> wrote:
>>>
>>> Fixes Warning encounter this by applying checkpatch.pl against this file:
>>> Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
>>> are __aligned(2)
>>>
>>> pahole output for respective structures:
>>> - addr->sa_data
>>> struct sockaddr {
>>>          sa_family_t                sa_family;            /*     0     2
>>> */
>>>          char                       sa_data[14];          /*     2    14
>>> */
>>>
>>>          /* size: 16, cachelines: 1, members: 2 */
>>>          /* last cacheline: 16 bytes */
>>> };
>>>
>>> - pnetdev->dev_addr
>>> dev_addr is interface address infor from generic net_device structure
>>> which is properly aligned and have some patches with this change as well.
>>> "staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
>>> (sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)
>>>
>>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Cc: Larry Finger <Larry.Finger@lwfinger.net>
>>> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
>>> ---
>>> Changes for v3:
>>>          - Removed unaligned conversions
>>> Changes for v2:
>>>          - Describe a changelog, to prove address are aligned
>>>
>>>   drivers/staging/rtl8712/os_intfs.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/rtl8712/os_intfs.c
>>> b/drivers/staging/rtl8712/os_intfs.c
>>> index 6e776e5..d5f4c4d 100644
>>> --- a/drivers/staging/rtl8712/os_intfs.c
>>> +++ b/drivers/staging/rtl8712/os_intfs.c
>>> @@ -181,7 +181,7 @@ static int r871x_net_set_mac_address(struct
>>> net_device *pnetdev, void *p)
>>>          struct sockaddr *addr = p;
>>>
>>>          if (padapter->bup == false)
>>> -               memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN);
>>> +               ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
>>>          return 0;
>>>   }
>>>
>>> --
>>
>>
>> Ping!
>
>
> Ah. Not only are you ignorant, but you are also rude! The patch was not
> NACKed, thus it will be picked up in good time.

What are these statements, sending a patch with valid proofs implies rudeness?
Does this patch still have changes..?

-- 
Jagan

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

* Re: [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy()
  2015-05-20 19:46     ` Jagan Teki
@ 2015-05-20 19:57       ` Larry Finger
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2015-05-20 19:57 UTC (permalink / raw)
  To: Jagan Teki
  Cc: linux-kernel, devel, Florian Schilhabel, Dan Carpenter,
	Greg Kroah-Hartman

On 05/20/2015 02:46 PM, Jagan Teki wrote:
> On 21 May 2015 at 01:10, Larry Finger <Larry.Finger@lwfinger.net> wrote:
>> On 05/20/2015 01:41 PM, Jagan Teki wrote:
>>>
>>> On 18 May 2015 at 22:02, Jagan Teki <jteki@openedev.com> wrote:
>>>>
>>>> Fixes Warning encounter this by applying checkpatch.pl against this file:
>>>> Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
>>>> are __aligned(2)
>>>>
>>>> pahole output for respective structures:
>>>> - addr->sa_data
>>>> struct sockaddr {
>>>>           sa_family_t                sa_family;            /*     0     2
>>>> */
>>>>           char                       sa_data[14];          /*     2    14
>>>> */
>>>>
>>>>           /* size: 16, cachelines: 1, members: 2 */
>>>>           /* last cacheline: 16 bytes */
>>>> };
>>>>
>>>> - pnetdev->dev_addr
>>>> dev_addr is interface address infor from generic net_device structure
>>>> which is properly aligned and have some patches with this change as well.
>>>> "staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
>>>> (sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)
>>>>
>>>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>> Cc: Larry Finger <Larry.Finger@lwfinger.net>
>>>> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
>>>> ---
>>>> Changes for v3:
>>>>           - Removed unaligned conversions
>>>> Changes for v2:
>>>>           - Describe a changelog, to prove address are aligned
>>>>
>>>>    drivers/staging/rtl8712/os_intfs.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/staging/rtl8712/os_intfs.c
>>>> b/drivers/staging/rtl8712/os_intfs.c
>>>> index 6e776e5..d5f4c4d 100644
>>>> --- a/drivers/staging/rtl8712/os_intfs.c
>>>> +++ b/drivers/staging/rtl8712/os_intfs.c
>>>> @@ -181,7 +181,7 @@ static int r871x_net_set_mac_address(struct
>>>> net_device *pnetdev, void *p)
>>>>           struct sockaddr *addr = p;
>>>>
>>>>           if (padapter->bup == false)
>>>> -               memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN);
>>>> +               ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
>>>>           return 0;
>>>>    }
>>>>
>>>> --
>>>
>>>
>>> Ping!
>>
>>
>> Ah. Not only are you ignorant, but you are also rude! The patch was not
>> NACKed, thus it will be picked up in good time.
>
> What are these statements, sending a patch with valid proofs implies rudeness?
> Does this patch still have changes..?

No, that patch (V3) is OK. Sending a ping after 2 days is most certainly rude. 
That implies that no one has anything better to do than cater to your 
submissions. As Greg told you, wait for a while.

Larry



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

end of thread, other threads:[~2015-05-20 19:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 16:32 [PATCH v3] staging: rtl8712: Use ether_addr_copy() instead of memcpy() Jagan Teki
2015-05-20 18:41 ` Jagan Teki
2015-05-20 19:31   ` Dan Carpenter
2015-05-20 19:40   ` Larry Finger
2015-05-20 19:46     ` Jagan Teki
2015-05-20 19:57       ` Larry Finger

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.