mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error
@ 2021-09-18  4:48 Randy Dunlap
  2021-09-21 12:52 ` Hans de Goede
  2021-09-21 12:53 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-09-18  4:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Perry Yuan, Dell.Client.Kernel,
	platform-driver-x86, Hans de Goede, Mark Gross

When DELL_WMI=y, DELL_WMI_PRIVACY=y, and LEDS_TRIGGER_AUDIO=m, there
is a linker error since the LEDS trigger code is built as a loadable
module. This happens because DELL_WMI_PRIVACY is a bool that depends
on a tristate (LEDS_TRIGGER_AUDIO=m), which can be dangerous.

ld: drivers/platform/x86/dell/dell-wmi-privacy.o: in function `dell_privacy_wmi_probe':
dell-wmi-privacy.c:(.text+0x3df): undefined reference to `ledtrig_audio_get'

Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
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>
---
 drivers/platform/x86/dell/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-next-20210917.orig/drivers/platform/x86/dell/Kconfig
+++ linux-next-20210917/drivers/platform/x86/dell/Kconfig
@@ -166,8 +166,7 @@ config DELL_WMI
 
 config DELL_WMI_PRIVACY
 	bool "Dell WMI Hardware Privacy Support"
-	depends on DELL_WMI
-	depends on LEDS_TRIGGER_AUDIO
+	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
 	help
 	  This option adds integration with the "Dell Hardware Privacy"
 	  feature of Dell laptops to the dell-wmi driver.

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

* Re: [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error
  2021-09-18  4:48 [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error Randy Dunlap
@ 2021-09-21 12:52 ` Hans de Goede
  2021-09-21 12:53 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-09-21 12:52 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Perry Yuan, Dell.Client.Kernel, platform-driver-x86, Mark Gross

Hi,

On 9/18/21 6:48 AM, Randy Dunlap wrote:
> When DELL_WMI=y, DELL_WMI_PRIVACY=y, and LEDS_TRIGGER_AUDIO=m, there
> is a linker error since the LEDS trigger code is built as a loadable
> module. This happens because DELL_WMI_PRIVACY is a bool that depends
> on a tristate (LEDS_TRIGGER_AUDIO=m), which can be dangerous.
> 
> ld: drivers/platform/x86/dell/dell-wmi-privacy.o: in function `dell_privacy_wmi_probe':
> dell-wmi-privacy.c:(.text+0x3df): undefined reference to `ledtrig_audio_get'
> 
> Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
> 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>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/dell/Kconfig |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> --- linux-next-20210917.orig/drivers/platform/x86/dell/Kconfig
> +++ linux-next-20210917/drivers/platform/x86/dell/Kconfig
> @@ -166,8 +166,7 @@ config DELL_WMI
>  
>  config DELL_WMI_PRIVACY
>  	bool "Dell WMI Hardware Privacy Support"
> -	depends on DELL_WMI
> -	depends on LEDS_TRIGGER_AUDIO
> +	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
>  	help
>  	  This option adds integration with the "Dell Hardware Privacy"
>  	  feature of Dell laptops to the dell-wmi driver.
> 


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

* Re: [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error
  2021-09-18  4:48 [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error Randy Dunlap
  2021-09-21 12:52 ` Hans de Goede
@ 2021-09-21 12:53 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-09-21 12:53 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Perry Yuan, Dell.Client.Kernel, platform-driver-x86, Mark Gross

Hi,

On 9/18/21 6:48 AM, Randy Dunlap wrote:
> When DELL_WMI=y, DELL_WMI_PRIVACY=y, and LEDS_TRIGGER_AUDIO=m, there
> is a linker error since the LEDS trigger code is built as a loadable
> module. This happens because DELL_WMI_PRIVACY is a bool that depends
> on a tristate (LEDS_TRIGGER_AUDIO=m), which can be dangerous.
> 
> ld: drivers/platform/x86/dell/dell-wmi-privacy.o: in function `dell_privacy_wmi_probe':
> dell-wmi-privacy.c:(.text+0x3df): undefined reference to `ledtrig_audio_get'
> 
> Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
> 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>

p.s.

I'll also add this to the pdx86 fixes branch and include it in my next
pdx86-fixes for 5.15 pull-req to Linus.

Regards,

Hans




> ---
>  drivers/platform/x86/dell/Kconfig |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> --- linux-next-20210917.orig/drivers/platform/x86/dell/Kconfig
> +++ linux-next-20210917/drivers/platform/x86/dell/Kconfig
> @@ -166,8 +166,7 @@ config DELL_WMI
>  
>  config DELL_WMI_PRIVACY
>  	bool "Dell WMI Hardware Privacy Support"
> -	depends on DELL_WMI
> -	depends on LEDS_TRIGGER_AUDIO
> +	depends on LEDS_TRIGGER_AUDIO = y || DELL_WMI = LEDS_TRIGGER_AUDIO
>  	help
>  	  This option adds integration with the "Dell Hardware Privacy"
>  	  feature of Dell laptops to the dell-wmi driver.
> 


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

end of thread, other threads:[~2021-09-21 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  4:48 [PATCH] platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error Randy Dunlap
2021-09-21 12:52 ` Hans de Goede
2021-09-21 12:53 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®