# Re: \[PATCH net-next 2/5\] ethernet: tg3: remove direct netdev-\>dev\_addr writes

- From: Michael Chan \<michael.chan@broadcom.com\>
- Date: 2021-10-08 18:57:49 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/10/11213001
- Thread: https://ratatoskr.run/netdev/2021/10/11212992/t.md

```text
On Fri, Oct 8, 2021 at 10:59 AM Jakub Kicinski [ref] wrote:
>
> tg3 does various forms of direct writes to netdev->dev_addr.
> Use a local buffer. Make sure local buffer is aligned since
> eth_platform_get_mac_address() may call ether_addr_copy().
>
> tg3_get_device_address() returns whenever it finds a method
> that found a valid address. Instead of modifying all the exit
> points pass the buffer from the outside and commit the address
> in the caller.
>
> Constify the argument of the set addr helper.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
```
