[PATCH net-next] ath10k: wmi: Convert use of 6 to ETH_ALEN

Joe Perches joe at perches.com
Thu Oct 3 00:56:01 EDT 2013


On Wed, 2013-10-02 at 21:18 -0700, Eric Dumazet wrote:
> On Wed, 2013-10-02 at 20:39 -0700, Joe Perches wrote:
> > Use the appropriate define instead of 6.
[]
> I don't get it.
> Why leaving this then ?
> 
> struct wmi_mac_addr {
>         union {
>                 u8 addr[6];
>                 struct {
>                         u32 word0;
>                         u32 word1;
>                 } __packed;
>         } __packed;
> } __packed;

'cause I just did the ones I noticed around the memcpy/memset
grep pattern I used.

$ grep -rP --include=*.[ch] -n "\b(memset|memcpy)\s*\([^,]+,[^,]+,\s*6\s*\)" drivers/net

You're welcome to look for all the [6] uses and convert the
appropriate ones too.  Maybe use that eth_addr_t typedef.

$ git grep -E "\[\s*6\s*\]\s*;" drivers/net/




More information about the ath10k mailing list