Message ID | 20240827191000.3244-4-wahrenst@gmx.net (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: vertexcom: mse102x: Minor clean-ups | expand |
On Tue, Aug 27, 2024 at 09:09:58PM +0200, Stefan Wahren wrote: > At the time of MAC address assignment the netdev is not registered yet, > so netdev log functions won't work as expected. While we are at this > downgrade the log level to a warning, because a random MAC address is > not a real error. > > Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 336435fe8241..4ce027f8e376 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -485,8 +485,8 @@ static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np) if (ret) { eth_hw_addr_random(ndev); - netdev_err(ndev, "Using random MAC address: %pM\n", - ndev->dev_addr); + dev_warn(ndev->dev.parent, "Using random MAC address: %pM\n", + ndev->dev_addr); } }
At the time of MAC address assignment the netdev is not registered yet, so netdev log functions won't work as expected. While we are at this downgrade the log level to a warning, because a random MAC address is not a real error. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> --- drivers/net/ethernet/vertexcom/mse102x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.34.1