From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH AUTOSEL 4.19 147/209] platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items Date: Tue, 12 Nov 2019 20:49:23 -0500 Message-ID: <20191113015025.9685-147-sashal@kernel.org> References: <20191113015025.9685-1-sashal@kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20191113015025.9685-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Vadim Pasternak , Andy Shevchenko , Sasha Levin , platform-driver-x86@vger.kernel.org, clang-built-linux@googlegroups.com List-Id: platform-driver-x86.vger.kernel.org From: Nathan Chancellor [ Upstream commit 8289c4b6f2e53750de78bd38cecb6bce4d7a988c ] 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 Acked-by: Vadim Pasternak Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin --- drivers/platform/x86/mlx-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index 742a0c2179256..d17db140cb1fc 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[] = { static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_msn201x_data = { - .items = mlxplat_mlxcpld_msn21xx_items, + .items = mlxplat_mlxcpld_msn201x_items, .counter = ARRAY_SIZE(mlxplat_mlxcpld_msn201x_items), .cell = MLXPLAT_CPLD_LPC_REG_AGGR_OFFSET, .mask = MLXPLAT_CPLD_AGGR_MASK_DEF, -- 2.20.1