mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-14 14:36:00 +00:00
Clang warns:
drivers/net/ethernet/microchip/sparx5/sparx5_main.c:760:29: warning:
variable 'mac_addr' is uninitialized when used here [-Wuninitialized]
if (of_get_mac_address(np, mac_addr)) {
^~~~~~~~
drivers/net/ethernet/microchip/sparx5/sparx5_main.c:669:14: note:
initialize the variable 'mac_addr' to silence this warning
u8 *mac_addr;
^
= NULL
1 warning generated.
mac_addr is only used to store the value retrieved from
of_get_mac_address(), which is then copied into the base_mac member of
the sparx5 struct using ether_addr_copy(). It is easier to just use the
base_mac address directly, which avoids the warning and the extra copy.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| sparx5_calendar.c | ||
| sparx5_ethtool.c | ||
| sparx5_mactable.c | ||
| sparx5_main_regs.h | ||
| sparx5_main.c | ||
| sparx5_main.h | ||
| sparx5_netdev.c | ||
| sparx5_packet.c | ||
| sparx5_phylink.c | ||
| sparx5_port.c | ||
| sparx5_port.h | ||
| sparx5_switchdev.c | ||
| sparx5_vlan.c | ||