All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (dell-smm) Don't build the proc interface if there's no /proc
@ 2021-09-15 13:47 Adam Borowski
  2021-09-15 14:20 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Borowski @ 2021-09-15 13:47 UTC (permalink / raw)
  To: Pali Rohár, Jean Delvare, Guenter Roeck, linux-hwmon; +Cc: Adam Borowski

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 drivers/hwmon/dell-smm-hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 774c1b0715d9..f381dfe1b427 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -403,7 +403,7 @@ static int __init i8k_get_dell_signature(int req_fn)
 	return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1;
 }
 
-#if IS_ENABLED(CONFIG_I8K)
+#if IS_ENABLED(CONFIG_I8K) && IS_ENABLED(CONFIG_PROCFS)
 
 /*
  * Read the Fn key status.
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] hwmon: (dell-smm) Don't build the proc interface if there's no /proc
  2021-09-15 13:47 [PATCH] hwmon: (dell-smm) Don't build the proc interface if there's no /proc Adam Borowski
@ 2021-09-15 14:20 ` Guenter Roeck
  2021-09-15 14:38   ` [PATCH v2] " Adam Borowski
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-09-15 14:20 UTC (permalink / raw)
  To: Adam Borowski, Pali Rohár, Jean Delvare, linux-hwmon

On 9/15/21 6:47 AM, Adam Borowski wrote:
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
>   drivers/hwmon/dell-smm-hwmon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 774c1b0715d9..f381dfe1b427 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -403,7 +403,7 @@ static int __init i8k_get_dell_signature(int req_fn)
>   	return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1;
>   }
>   
> -#if IS_ENABLED(CONFIG_I8K)
> +#if IS_ENABLED(CONFIG_I8K) && IS_ENABLED(CONFIG_PROCFS)
>   

This should be expressed as Kconfig dependency: I8K should depend on PROCFS.
Otherwise the configuration flag is misleading.

Guenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] hwmon: (dell-smm) Don't build the proc interface if there's no /proc
  2021-09-15 14:20 ` Guenter Roeck
@ 2021-09-15 14:38   ` Adam Borowski
  2021-09-15 15:16     ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Borowski @ 2021-09-15 14:38 UTC (permalink / raw)
  To: Guenter Roeck, Pali Rohár, Jean Delvare, linux-hwmon; +Cc: Adam Borowski

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
Guenter wrote:
> > -#if IS_ENABLED(CONFIG_I8K)
> > +#if IS_ENABLED(CONFIG_I8K) && IS_ENABLED(CONFIG_PROCFS)

> This should be expressed as Kconfig dependency: I8K should depend on PROCFS.
> Otherwise the configuration flag is misleading.

Right, I did not notice I8K does nothing otherwise.

 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 4e001bbbb425..a7365695ff72 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1253,6 +1253,7 @@ config I8K
 	tristate "Dell i8k legacy laptop support"
 	select HWMON
 	select SENSORS_DELL_SMM
+	depends on PROC_FS
 	help
 	  This option enables legacy /proc/i8k userspace interface in hwmon
 	  dell-smm-hwmon driver. Character file /proc/i8k reports bios version,
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] hwmon: (dell-smm) Don't build the proc interface if there's no /proc
  2021-09-15 14:38   ` [PATCH v2] " Adam Borowski
@ 2021-09-15 15:16     ` Guenter Roeck
  2021-09-15 15:17       ` Pali Rohár
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2021-09-15 15:16 UTC (permalink / raw)
  To: Adam Borowski; +Cc: Pali Rohár, Jean Delvare, linux-hwmon

On Wed, Sep 15, 2021 at 04:38:01PM +0200, Adam Borowski wrote:

There should be some description here.

> Signed-off-by: Adam Borowski <kilobyte@angband.pl>

Otherwise, for the content:

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
> Guenter wrote:
> > > -#if IS_ENABLED(CONFIG_I8K)
> > > +#if IS_ENABLED(CONFIG_I8K) && IS_ENABLED(CONFIG_PROCFS)
> 
> > This should be expressed as Kconfig dependency: I8K should depend on PROCFS.
> > Otherwise the configuration flag is misleading.
> 
> Right, I did not notice I8K does nothing otherwise.
> 
>  arch/x86/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 4e001bbbb425..a7365695ff72 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1253,6 +1253,7 @@ config I8K
>  	tristate "Dell i8k legacy laptop support"
>  	select HWMON
>  	select SENSORS_DELL_SMM
> +	depends on PROC_FS
>  	help
>  	  This option enables legacy /proc/i8k userspace interface in hwmon
>  	  dell-smm-hwmon driver. Character file /proc/i8k reports bios version,
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] hwmon: (dell-smm) Don't build the proc interface if there's no /proc
  2021-09-15 15:16     ` Guenter Roeck
@ 2021-09-15 15:17       ` Pali Rohár
  0 siblings, 0 replies; 5+ messages in thread
From: Pali Rohár @ 2021-09-15 15:17 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Adam Borowski, Jean Delvare, linux-hwmon

On Wednesday 15 September 2021 08:16:13 Guenter Roeck wrote:
> On Wed, Sep 15, 2021 at 04:38:01PM +0200, Adam Borowski wrote:
> 
> There should be some description here.
> 
> > Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> 
> Otherwise, for the content:
> 
> Acked-by: Guenter Roeck <linux@roeck-us.net>
> 
> > ---
> > Guenter wrote:
> > > > -#if IS_ENABLED(CONFIG_I8K)
> > > > +#if IS_ENABLED(CONFIG_I8K) && IS_ENABLED(CONFIG_PROCFS)
> > 
> > > This should be expressed as Kconfig dependency: I8K should depend on PROCFS.
> > > Otherwise the configuration flag is misleading.
> > 
> > Right, I did not notice I8K does nothing otherwise.
> > 
> >  arch/x86/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 4e001bbbb425..a7365695ff72 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1253,6 +1253,7 @@ config I8K
> >  	tristate "Dell i8k legacy laptop support"
> >  	select HWMON
> >  	select SENSORS_DELL_SMM
> > +	depends on PROC_FS

Seems like this patch is duplicate of another pending patch:
https://lore.kernel.org/linux-hwmon/20210910071921.16777-1-rdunlap@infradead.org/

> >  	help
> >  	  This option enables legacy /proc/i8k userspace interface in hwmon
> >  	  dell-smm-hwmon driver. Character file /proc/i8k reports bios version,
> > -- 
> > 2.33.0
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-15 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 13:47 [PATCH] hwmon: (dell-smm) Don't build the proc interface if there's no /proc Adam Borowski
2021-09-15 14:20 ` Guenter Roeck
2021-09-15 14:38   ` [PATCH v2] " Adam Borowski
2021-09-15 15:16     ` Guenter Roeck
2021-09-15 15:17       ` Pali Rohár

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.