Skip to content

Commit 8e725ff

Browse files
nathanchanceij-intel
authored andcommitted
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: 56b0bb7 ("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>
1 parent 8357967 commit 8e725ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/mellanox/nvsw-sn2201.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static struct mlxreg_core_item nvsw_sn2201_busbar_items[] = {
551551

552552
static
553553
struct mlxreg_core_hotplug_platform_data nvsw_sn2201_busbar_hotplug = {
554-
.items = nvsw_sn2201_items,
554+
.items = nvsw_sn2201_busbar_items,
555555
.count = ARRAY_SIZE(nvsw_sn2201_busbar_items),
556556
.cell = NVSW_SN2201_SYS_INT_STATUS_OFFSET,
557557
.mask = NVSW_SN2201_CPLD_AGGR_BUSBAR_MASK_DEF,

0 commit comments

Comments
 (0)