]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: Drop initialization of flexible ethtool_link_ksettings
authorSven Eckelmann <sven@narfation.org>
Sat, 20 Aug 2022 07:32:50 +0000 (09:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:51 +0000 (12:50 +0100)
commit6ad06346133220d68ee6534dd64ad9bfb5556892
tree062298cdc44bd87c99b07470d6598718b1731f36
parentd775f9e9e663690d702ca29da0b18f8bdd7a6e37
batman-adv: Drop initialization of flexible ethtool_link_ksettings

[ Upstream commit 813e62a6fe7539fdf0d8e018d4f157b57bdaeedd ]

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 of __ethtool_get_link_ksettings - everything will be
initialized by the callee when no error occurs.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Stable-dep-of: 8c8ecc98f5c6 ("batman-adv: Drop unmanaged ELP metric worker")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/batman-adv/bat_v_elp.c