Skip to content

Commit eca6ba2

Browse files
arndbjwrdegoede
authored andcommitted
platform/x86: mlx-platform: remove an unused variable
The only reference to the mlxplat_mlxcpld_psu[] array got removed, so there is now a warning from clang: drivers/platform/x86/mlx-platform.c:322:30: error: variable 'mlxplat_mlxcpld_psu' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static struct i2c_board_info mlxplat_mlxcpld_psu[] = { Remove the array as well and adapt the ARRAY_SIZE() call accordingly. Fixes: 912b341 ("platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Vadim Pasternak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 06706da commit eca6ba2

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,6 @@ static struct i2c_mux_reg_platform_data mlxplat_extended_mux_data[] = {
319319
};
320320

321321
/* Platform hotplug devices */
322-
static struct i2c_board_info mlxplat_mlxcpld_psu[] = {
323-
{
324-
I2C_BOARD_INFO("24c02", 0x51),
325-
},
326-
{
327-
I2C_BOARD_INFO("24c02", 0x50),
328-
},
329-
};
330-
331322
static struct i2c_board_info mlxplat_mlxcpld_pwr[] = {
332323
{
333324
I2C_BOARD_INFO("dps460", 0x59),
@@ -456,7 +447,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_default_items[] = {
456447
.aggr_mask = MLXPLAT_CPLD_AGGR_PSU_MASK_DEF,
457448
.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
458449
.mask = MLXPLAT_CPLD_PSU_MASK,
459-
.count = ARRAY_SIZE(mlxplat_mlxcpld_psu),
450+
.count = ARRAY_SIZE(mlxplat_mlxcpld_default_psu_items_data),
460451
.inversed = 1,
461452
.health = false,
462453
},
@@ -495,7 +486,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_comex_items[] = {
495486
.aggr_mask = MLXPLAT_CPLD_AGGR_MASK_CARRIER,
496487
.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
497488
.mask = MLXPLAT_CPLD_PSU_MASK,
498-
.count = ARRAY_SIZE(mlxplat_mlxcpld_psu),
489+
.count = ARRAY_SIZE(mlxplat_mlxcpld_default_psu_items_data),
499490
.inversed = 1,
500491
.health = false,
501492
},

0 commit comments

Comments
 (0)