All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Randy Dunlap" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	Borislav Petkov <bp@suse.de>, Guenter Roeck <linux@roeck-us.net>,
	pali@kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/misc] x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
Date: Mon, 04 Oct 2021 09:48:45 -0000	[thread overview]
Message-ID: <163334092560.25758.6789545756076554393.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210910071921.16777-1-rdunlap@infradead.org>

The following commit has been merged into the x86/misc branch of tip:

Commit-ID:     ef775a0e36c6a81c5b07cb228c02f967133fe768
Gitweb:        https://git.kernel.org/tip/ef775a0e36c6a81c5b07cb228c02f967133fe768
Author:        Randy Dunlap <rdunlap@infradead.org>
AuthorDate:    Fri, 10 Sep 2021 00:19:21 -07:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 04 Oct 2021 11:11:48 +02:00

x86/Kconfig: Fix an unused variable error in dell-smm-hwmon

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 <arnd@arndb.de>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Pali Rohár <pali@kernel.org>
Link: https://lkml.kernel.org/r/20210910071921.16777-1-rdunlap@infradead.org
---
 arch/x86/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ab83c22..16e216b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1256,7 +1256,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

      parent reply	other threads:[~2021-10-04  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  7:19 [PATCH] hwmon: dell-smm-hwmon: fix unused variable error Randy Dunlap
2021-09-10 15:34 ` Guenter Roeck
2021-09-10 23:14 ` Pali Rohár
2021-09-20 17:57 ` Arnd Bergmann
2021-09-22 17:19 ` [tip: x86/misc] x86/Kconfig: Fix an unused variable error in dell-smm-hwmon tip-bot2 for Randy Dunlap
2021-10-04  9:48 ` tip-bot2 for Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=163334092560.25758.6789545756076554393.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pali@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.