Re: [PATCHv2 18/19] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue
From: Greg Kroah-Hartman
Date: Sat Sep 05 2015 - 20:44:57 EST
On Sat, Sep 05, 2015 at 06:16:16PM -0400, Raphaël Beamonte wrote:
> 2015-09-03 13:00 GMT-04:00 Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>:
> > You need to prove that they are aligned before I can take this patch :(
> I looked at those structs using pahole. The structs used are
> net_device from include/linux/netdevice.h and sockaddr from
> include/linux/socket.h, in which we use the elements dev_addr and
> sa_data respectively.
> Using pahole, the output for both those elements in the structs are:
> unsigned char * dev_addr; /* 888 8 */
> char sa_data; /* 2 14 */
> If I understand correctly how pahole is outputing the information and
> what a u16 alignment means in the struct, I should, for both those
> cases, have a multiple of 2 (sizeof(u16)) as first value in the
> comment following the line (first value being the position of the
> element in the struct, second value its size). So if I understood
> correctly, in both those cases, it's working: they're u16 aligned.
> Also, to be sure, I searched in the kernel sources and found multiple
> files that are currently using both those structs and ether_addr_copy:
> (line numbers are those for commit 34fca4b of your staging-testing
> drivers/net/ethernet/broadcom/genet/bcmgenet.c (line 2957)
> drivers/net/ethernet/brocade/bna/bnad.c (line 3250)
> drivers/net/ethernet/emulex/benet/be_main.c (line 315)
> drivers/net/ethernet/ezchip/nps_enet.c (line 421)
> drivers/net/ethernet/ibm/ibmveth.c (line 1460)
> drivers/net/ethernet/intel/fm10k/fm10k_netdev.c (line 911)
> drivers/net/ethernet/intel/i40e/i40e_main.c (line 1518)
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c (line 1796)
> drivers/net/usb/lan78xx.c (line 1777)
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c (line 2285)
> drivers/staging/rtl8712/os_intfs.c (line 181)
> net/8021q/vlan_dev.c (line 338)
> net/batman-adv/soft-interface.c (line 140)
> net/dsa/slave.c (line 198)
> Given that information, it should be fine for that change in rtl8192u!
> But if I'm mistaken somewhere please tell me!
> Should I update my patch with those information in the changelog?
> If so, how verbose do you expect it to be?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/