[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB38987FFE8C575364D7FE3AF0AFF20@DM6PR12MB3898.namprd12.prod.outlook.com>
Date: Thu, 3 Dec 2020 23:17:07 +0000
From: Vadim Pasternak <vadimp@...dia.com>
To: Arnd Bergmann <arnd@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
"Mark Gross" <mgross@...ux.intel.com>,
Nathan Chancellor <natechancellor@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>
CC: Arnd Bergmann <arnd@...db.de>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Michael Shych <michaelsh@...lanox.com>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"clang-built-linux@...glegroups.com"
<clang-built-linux@...glegroups.com>
Subject: RE: [PATCH] platform/x86: mlx-platform: remove an unused variable
> -----Original Message-----
> From: Arnd Bergmann <arnd@...nel.org>
> Sent: Friday, December 04, 2020 12:31 AM
> To: Vadim Pasternak <vadimp@...dia.com>; Hans de Goede
> <hdegoede@...hat.com>; Mark Gross <mgross@...ux.intel.com>; Nathan
> Chancellor <natechancellor@...il.com>; Nick Desaulniers
> <ndesaulniers@...gle.com>
> Cc: Arnd Bergmann <arnd@...db.de>; Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com>; Michael Shych
> <michaelsh@...lanox.com>; platform-driver-x86@...r.kernel.org; linux-
> kernel@...r.kernel.org; clang-built-linux@...glegroups.com
> Subject: [PATCH] platform/x86: mlx-platform: remove an unused variable
>
> From: Arnd Bergmann <arnd@...db.de>
Acked-by: Vadim Pasternak <vadimp@...dia.com>
>
> 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: 912b341585e3 ("platform/x86: mlx-platform: Remove PSU EEPROM from
> MSN274x platform configuration")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/platform/x86/mlx-platform.c | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-
> platform.c
> index 598f44558764..6a634b72bfc2 100644
> --- a/drivers/platform/x86/mlx-platform.c
> +++ b/drivers/platform/x86/mlx-platform.c
> @@ -319,15 +319,6 @@ static struct i2c_mux_reg_platform_data
> mlxplat_extended_mux_data[] = { };
>
> /* Platform hotplug devices */
> -static struct i2c_board_info mlxplat_mlxcpld_psu[] = {
> - {
> - I2C_BOARD_INFO("24c02", 0x51),
> - },
> - {
> - I2C_BOARD_INFO("24c02", 0x50),
> - },
> -};
> -
> static struct i2c_board_info mlxplat_mlxcpld_pwr[] = {
> {
> I2C_BOARD_INFO("dps460", 0x59),
> @@ -456,7 +447,7 @@ static struct mlxreg_core_item
> mlxplat_mlxcpld_default_items[] = {
> .aggr_mask = MLXPLAT_CPLD_AGGR_PSU_MASK_DEF,
> .reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
> .mask = MLXPLAT_CPLD_PSU_MASK,
> - .count = ARRAY_SIZE(mlxplat_mlxcpld_psu),
> + .count =
> ARRAY_SIZE(mlxplat_mlxcpld_default_psu_items_data),
> .inversed = 1,
> .health = false,
> },
> @@ -495,7 +486,7 @@ static struct mlxreg_core_item
> mlxplat_mlxcpld_comex_items[] = {
> .aggr_mask = MLXPLAT_CPLD_AGGR_MASK_CARRIER,
> .reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
> .mask = MLXPLAT_CPLD_PSU_MASK,
> - .count = ARRAY_SIZE(mlxplat_mlxcpld_psu),
> + .count =
> ARRAY_SIZE(mlxplat_mlxcpld_default_psu_items_data),
> .inversed = 1,
> .health = false,
> },
> --
> 2.27.0
Powered by blists - more mailing lists