diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-26 01:21:15 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-10-08 10:47:43 -0400 |
commit | 8289c4b6f2e53750de78bd38cecb6bce4d7a988c (patch) | |
tree | d32befd3aece381e471e915cea4267e47536a2ac | |
parent | 5aa389aa29ce0fcdd39fa88245bcad6cea6af57c (diff) |
platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items
Clang warns that mlxplat_mlxcpld_msn201x_items is not going to be
emitted in the final assembly because it's only used in ARRAY_SIZE right
now, which is a compile time evaluation since the array's size is known.
drivers/platform/x86/mlx-platform.c:555:32: warning: variable
'mlxplat_mlxcpld_msn201x_items' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static struct mlxreg_core_item mlxplat_mlxcpld_msn201x_items[] = {
^
1 warning generated.
It appears this was a copy and paste mistake from when this item was
first added. Use the definition in mlxplat_mlxcpld_msn201x_data so that
Clang no longer warns.
Link: https://github.com/ClangBuiltLinux/linux/issues/141
Fixes: a49a41482f61 ("platform/x86: mlx-platform: Add support for new msn201x system type")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r-- | drivers/platform/x86/mlx-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index d89936c93ba0..c2c3a1a19879 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c | |||
@@ -575,7 +575,7 @@ static struct mlxreg_core_item mlxplat_mlxcpld_msn201x_items[] = { | |||
575 | 575 | ||
576 | static | 576 | static |
577 | struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_msn201x_data = { | 577 | struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_msn201x_data = { |
578 | .items = mlxplat_mlxcpld_msn21xx_items, | 578 | .items = mlxplat_mlxcpld_msn201x_items, |
579 | .counter = ARRAY_SIZE(mlxplat_mlxcpld_msn201x_items), | 579 | .counter = ARRAY_SIZE(mlxplat_mlxcpld_msn201x_items), |
580 | .cell = MLXPLAT_CPLD_LPC_REG_AGGR_OFFSET, | 580 | .cell = MLXPLAT_CPLD_LPC_REG_AGGR_OFFSET, |
581 | .mask = MLXPLAT_CPLD_AGGR_MASK_DEF, | 581 | .mask = MLXPLAT_CPLD_AGGR_MASK_DEF, |