All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI
@ 2021-09-27 20:53 Randy Dunlap
  2021-10-08 14:49 ` Randy Dunlap
  2021-10-11 13:15 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-09-27 20:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Perry Yuan, Dell.Client.Kernel,
	platform-driver-x86, Hans de Goede, Mark Gross

A randconfig or a user can set/enable DELL_WMI_PRIVACY even when
DELL_WMI is not enabled. This leads to a build error in
dell-laptop.o:

ld: drivers/platform/x86/dell/dell-laptop.o: in function `dell_init':
dell-laptop.c:(.init.text+0x719): undefined reference to `dell_privacy_has_mic_mute'

Fix this by enclosing the DELL_WMI driver options inside a
if DELL_WMI / endif bracket.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Perry Yuan <Perry.Yuan@dell.com>
Cc: Dell.Client.Kernel@dell.com
Cc: platform-driver-x86@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <mgross@linux.intel.com>
---
Found in linux-next, applies to mainline.

The last time that I sent a patch to Perry Yuan (about 2 weeks ago),
it bounced...

 drivers/platform/x86/dell/Kconfig |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20210927.orig/drivers/platform/x86/dell/Kconfig
+++ linux-next-20210927/drivers/platform/x86/dell/Kconfig
@@ -164,6 +164,8 @@ config DELL_WMI
 	  To compile this driver as a module, choose M here: the module will
 	  be called dell-wmi.
 
+if DELL_WMI
+
 config DELL_WMI_PRIVACY
 	bool "Dell WMI Hardware Privacy Support"
 	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
@@ -198,6 +200,8 @@ config DELL_WMI_LED
 	  This adds support for the Latitude 2100 and similar
 	  notebooks that have an external LED.
 
+endif # DELL_WMI
+
 config DELL_WMI_SYSMAN
 	tristate "Dell WMI-based Systems management driver"
 	default m

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

* Re: [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI
  2021-09-27 20:53 [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI Randy Dunlap
@ 2021-10-08 14:49 ` Randy Dunlap
  2021-10-11 13:15 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-10-08 14:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Perry Yuan, Dell.Client.Kernel, platform-driver-x86,
	Hans de Goede, Mark Gross

Still seeing this build error in linux-next, so the patch
is still needed...

On 9/27/21 1:53 PM, Randy Dunlap wrote:
> A randconfig or a user can set/enable DELL_WMI_PRIVACY even when
> DELL_WMI is not enabled. This leads to a build error in
> dell-laptop.o:
> 
> ld: drivers/platform/x86/dell/dell-laptop.o: in function `dell_init':
> dell-laptop.c:(.init.text+0x719): undefined reference to `dell_privacy_has_mic_mute'
> 
> Fix this by enclosing the DELL_WMI driver options inside a
> if DELL_WMI / endif bracket.
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Perry Yuan <Perry.Yuan@dell.com>
> Cc: Dell.Client.Kernel@dell.com
> Cc: platform-driver-x86@vger.kernel.org
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <mgross@linux.intel.com>
> ---
> Found in linux-next, applies to mainline.
> 
> The last time that I sent a patch to Perry Yuan (about 2 weeks ago),
> it bounced...
> 
>   drivers/platform/x86/dell/Kconfig |    4 ++++
>   1 file changed, 4 insertions(+)
> 
> --- linux-next-20210927.orig/drivers/platform/x86/dell/Kconfig
> +++ linux-next-20210927/drivers/platform/x86/dell/Kconfig
> @@ -164,6 +164,8 @@ config DELL_WMI
>   	  To compile this driver as a module, choose M here: the module will
>   	  be called dell-wmi.
>   
> +if DELL_WMI
> +
>   config DELL_WMI_PRIVACY
>   	bool "Dell WMI Hardware Privacy Support"
>   	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
> @@ -198,6 +200,8 @@ config DELL_WMI_LED
>   	  This adds support for the Latitude 2100 and similar
>   	  notebooks that have an external LED.
>   
> +endif # DELL_WMI
> +
>   config DELL_WMI_SYSMAN
>   	tristate "Dell WMI-based Systems management driver"
>   	default m
> 


-- 
~Randy

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

* Re: [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI
  2021-09-27 20:53 [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI Randy Dunlap
  2021-10-08 14:49 ` Randy Dunlap
@ 2021-10-11 13:15 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-10-11 13:15 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Perry Yuan, Dell.Client.Kernel, platform-driver-x86, Mark Gross

Hi Randy,

On 9/27/21 10:53 PM, Randy Dunlap wrote:
> A randconfig or a user can set/enable DELL_WMI_PRIVACY even when
> DELL_WMI is not enabled. This leads to a build error in
> dell-laptop.o:
> 
> ld: drivers/platform/x86/dell/dell-laptop.o: in function `dell_init':
> dell-laptop.c:(.init.text+0x719): undefined reference to `dell_privacy_has_mic_mute'
> 
> Fix this by enclosing the DELL_WMI driver options inside a
> if DELL_WMI / endif bracket.
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Perry Yuan <Perry.Yuan@dell.com>
> Cc: Dell.Client.Kernel@dell.com
> Cc: platform-driver-x86@vger.kernel.org
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <mgross@linux.intel.com>
> ---
> Found in linux-next, applies to mainline.
> 
> The last time that I sent a patch to Perry Yuan (about 2 weeks ago),
> it bounced...


Thank you for your patch, comments inline.

> 
>  drivers/platform/x86/dell/Kconfig |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- linux-next-20210927.orig/drivers/platform/x86/dell/Kconfig
> +++ linux-next-20210927/drivers/platform/x86/dell/Kconfig
> @@ -164,6 +164,8 @@ config DELL_WMI
>  	  To compile this driver as a module, choose M here: the module will
>  	  be called dell-wmi.
>  
> +if DELL_WMI
> +

Adding depends on DELL_WMI to DELL_WMI_PRIVACY definitely is the right
thing to do, since DELL_WMI_PRIVACY is intended as a feature toggle for the
main dell-wmi driver.

>  config DELL_WMI_PRIVACY
>  	bool "Dell WMI Hardware Privacy Support"
>  	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
> @@ -198,6 +200,8 @@ config DELL_WMI_LED
>  	  This adds support for the Latitude 2100 and similar
>  	  notebooks that have an external LED.
>  
> +endif # DELL_WMI
> +

But also adding it to DELL_WMI_AIO, DELL_WMI_DESCRIPTOR and 
DELL_WMI_LED is wrong, the _AIO and _LED options are independent and the
DELL_WMI_DESCRIPTOR option enables building of a helper lib which is
e.g. also selected by DELL_SMBIOS_WMI.

I'll prepare a new fix adding the depends on to just DELL_WMI_PRIVACY,
adding you (Randy) as Reported-by.  I'll merge that right after
sending it out for the archives, resolving this.

Regards,

Hans



>  config DELL_WMI_SYSMAN
>  	tristate "Dell WMI-based Systems management driver"
>  	default m
> 


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

end of thread, other threads:[~2021-10-11 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 20:53 [PATCH] platform: dell: all DELL_WMI driver options depend on DELL_WMI Randy Dunlap
2021-10-08 14:49 ` Randy Dunlap
2021-10-11 13:15 ` Hans de Goede

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.