mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-14 03:41:29 +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:
|
||
|---|---|---|
| .. | ||
| sparx5 | ||
| enc28j60_hw.h | ||
| enc28j60.c | ||
| encx24j600_hw.h | ||
| encx24j600-regmap.c | ||
| encx24j600.c | ||
| Kconfig | ||
| lan743x_ethtool.c | ||
| lan743x_ethtool.h | ||
| lan743x_main.c | ||
| lan743x_main.h | ||
| lan743x_ptp.c | ||
| lan743x_ptp.h | ||
| Makefile | ||