Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6126C43219 for ; Wed, 24 Nov 2021 13:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351076AbhKXNol (ORCPT ); Wed, 24 Nov 2021 08:44:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:34752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344551AbhKXNmH (ORCPT ); Wed, 24 Nov 2021 08:42:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B4E96328B; Wed, 24 Nov 2021 12:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637758694; bh=sXOgTOAj1t81oWB7sL+Gbffblj/VmaIpUcgMltDWyd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iiZSQaQBl4a4NEDBCq6LY8CeQ4XYUeEBMlrVDXD7NLryBYeA3uHTbuNX1StdLHi+m fj40MwjPDzMutRZYAhG9pBc4Qh53PLLeJXdKc9VRDXMkJUHkRlOEvs2Pd/AduqAA7m a5n7BGFtYgZNozxRUyQ0WbS/+Zwwz52V8Q6/NbDs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Randy Dunlap , Borislav Petkov , Guenter Roeck , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 5.10 154/154] x86/Kconfig: Fix an unused variable error in dell-smm-hwmon Date: Wed, 24 Nov 2021 12:59:10 +0100 Message-Id: <20211124115707.456833096@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115702.361983534@linuxfoundation.org> References: <20211124115702.361983534@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap commit ef775a0e36c6a81c5b07cb228c02f967133fe768 upstream. When CONFIG_PROC_FS is not set, there is a build warning (turned into an error): ../drivers/hwmon/dell-smm-hwmon.c: In function 'i8k_init_procfs': ../drivers/hwmon/dell-smm-hwmon.c:624:24: error: unused variable 'data' [-Werror=unused-variable] struct dell_smm_data *data = dev_get_drvdata(dev); Make I8K depend on PROC_FS and HWMON (instead of selecting HWMON -- it is strongly preferred to not select entire subsystems). Build tested in all possible combinations of SENSORS_DELL_SMM, I8K, and PROC_FS. Fixes: 039ae58503f3 ("hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k") Reported-by: Arnd Bergmann Signed-off-by: Randy Dunlap Signed-off-by: Borislav Petkov Reviewed-by: Arnd Bergmann Acked-by: Guenter Roeck Acked-by: Pali Rohár Link: https://lkml.kernel.org/r/20210910071921.16777-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1266,7 +1266,8 @@ config TOSHIBA config I8K tristate "Dell i8k legacy laptop support" - select HWMON + depends on HWMON + depends on PROC_FS select SENSORS_DELL_SMM help This option enables legacy /proc/i8k userspace interface in hwmon