Repository : ssh://git@diktynna/batman-adv
On branch : master
commit d5f557f18adc031678ffe6f65cd5c3e859e0829b Author: Sven Eckelmann sven@narfation.org Date: Sat Aug 20 09:32:50 2022 +0200
batman-adv: Drop initialization of flexible ethtool_link_ksettings
The commit 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with flexible-array members") changed various structures from using 0-length arrays to flexible arrays
net/batman-adv/bat_v_elp.c: note: in included file: ./include/linux/ethtool.h:148:38: warning: nested flexible array net/batman-adv/bat_v_elp.c:128:9: warning: using sizeof on a flexible structure
In theory, this could be worked around by using {} as initializer for the variable on the stack. But this variable doesn't has to be initialized at all by the caller - everything will be initialized by the callee when no error occurs.
Signed-off-by: Sven Eckelmann sven@narfation.org
d5f557f18adc031678ffe6f65cd5c3e859e0829b net/batman-adv/bat_v_elp.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index b6db999a..f1741fbf 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -125,7 +125,6 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) /* if not a wifi interface, check if this device provides data via * ethtool (e.g. an Ethernet adapter) */ - memset(&link_settings, 0, sizeof(link_settings)); rtnl_lock(); ret = __ethtool_get_link_ksettings(hard_iface->net_dev, &link_settings); rtnl_unlock();