]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc: use get/put_unaligned helpers for MAC address handling
authorMichael Walle <michael@walle.cc>
Fri, 4 Jun 2021 13:42:12 +0000 (15:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jun 2021 21:39:05 +0000 (14:39 -0700)
commit7aff6f28d79898f6f1306cac50c04c2ff3eded1d
tree83f936bedefe51f1e622a49af38fb7a1e3b4a29e
parent1664ee57d85ae29c22943b1e843efd1184e720f2
net: enetc: use get/put_unaligned helpers for MAC address handling

The supplied buffer for the MAC address might not be aligned. Thus
doing a 32bit (or 16bit) access could be on an unaligned address. For
now, enetc is only used on aarch64 which can do unaligned accesses, thus
there is no error. In any case, be correct and use the get/put_unaligned
helpers.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_pf.c