lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32
David Miller <davem@davemloft.net> 于2019年7月23日周二 上午9:22写道:
>
> From: Chuhong Yuan <hslester96@gmail.com>
> Date: Mon, 22 Jul 2019 15:41:34 +0800
>
> > Merge the combo uses of cpu_to_le32s and memcpy.
> > Use put_unaligned_le32 instead.
> > This simplifies the code.
> >
> > Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
>
> Isn't the skb->data aligned to 4 bytes in these situations?
>
> If so, we should use the aligned variants.
>
> Thank you.

I have checked the five changed files.
I find that they all have used get_unaligned_le32 for skb->data
according to my previous applied patches and existing code.
So I think the skb->data is unaligned in these situations.

Usages of get_unaligned_le32:
asix_common.c: line 104 and 133
ax88179_178a.c: https://lkml.org/lkml/2019/7/19/652
lan78xx.c: https://lkml.org/lkml/2019/7/19/573
smsc75xx.c: https://lkml.org/lkml/2019/7/19/617
sr9800.c: line 73

\
 
 \ /
  Last update: 2019-07-23 04:17    [W:0.034 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site