net, treewide: define and use MAC_ADDR_STR_LEN
authorUday Shankar <ushankar@purestorage.com>
Wed, 12 Mar 2025 19:51:46 +0000 (13:51 -0600)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 19 Mar 2025 18:17:58 +0000 (19:17 +0100)
commit6d6c1ba7824022528dbe3e283fafbd0775424128
tree0887dedc1321e397e52db3e50b2079c2b6c9e75f
parent34e5ededf4b8ad4c9e58f0cab8596e26c8fa59a2
net, treewide: define and use MAC_ADDR_STR_LEN

There are a few places in the tree which compute the length of the
string representation of a MAC address as 3 * ETH_ALEN - 1. Define a
constant for this and use it where relevant. No functionality changes
are expected.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@verge.net.au>
Link: https://patch.msgid.link/20250312-netconsole-v6-1-3437933e79b8@purestorage.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/netconsole.c
drivers/nvmem/brcm_nvram.c
drivers/nvmem/layouts/u-boot-env.c
include/linux/if_ether.h
lib/net_utils.c
net/mac80211/debugfs_sta.c