diff options
author | 2025-05-09 11:58:01 +0100 | |
---|---|---|
committer | 2025-05-11 23:39:16 +0300 | |
commit | 8e725ff0419ad74dc79abfbdcd4cfba936a5d167 (patch) | |
tree | 41366028156162c14bbdeb0b6cb74987ebd1911d /scripts/lib/kdoc/kdoc_files.py | |
parent | platform/x86: portwell-ec: Add GPIO and WDT driver for Portwell EC (diff) | |
download | linux-rng-8e725ff0419ad74dc79abfbdcd4cfba936a5d167.tar.xz linux-rng-8e725ff0419ad74dc79abfbdcd4cfba936a5d167.zip |
platform: mellanox: nvsw-sn2200: Fix .items in nvsw_sn2201_busbar_hotplug
Clang warns (or errors with CONFIG_WERROR=y):
drivers/platform/mellanox/nvsw-sn2201.c:531:32: error: variable 'nvsw_sn2201_busbar_items' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
531 | static struct mlxreg_core_item nvsw_sn2201_busbar_items[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
nvsw_sn2201_busbar_items is only used in ARRAY_SIZE(), which uses
sizeof(), so this variable is only used at compile time. It appears that
this may be a copy and paste issue, so use nvsw_sn2201_busbar_items as
the .items member in nvsw_sn2201_busbar_hotplug, clearing up the
warning.
Fixes: 56b0bb7f9069 ("platform: mellanox: nvsw-sn2200: Add support for new system flavour")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250509-nvsw-sn2200-fix-items-busbar-hotplug-v1-1-8844fff38dc8@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions