linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
@ 2025-04-09 21:35 Mario Limonciello
  2025-04-10  8:03 ` Shyam Sundar S K
  2025-04-10 12:50 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Mario Limonciello @ 2025-04-09 21:35 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Linus Walleij, open list:PIN CONTROL SUBSYSTEM, open list,
	linux-acpi, Basavaraj Natikar, Shyam Sundar S K,
	Mario Limonciello, kernel test robot

From: Mario Limonciello <mario.limonciello@amd.com>

`pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
`CONFIG_PM_SLEEP` so the functions that use it need the same scope.

Adjust checks to look for both.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/pinctrl/pinctrl-amd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index b6fafed79b289..472a5aed4cd05 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -1209,7 +1209,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, gpio_dev);
 	acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
 	acpi_register_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
 #endif
 
@@ -1230,7 +1230,7 @@ static void amd_gpio_remove(struct platform_device *pdev)
 
 	gpiochip_remove(&gpio_dev->gc);
 	acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
 	acpi_unregister_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
 #endif
 }
-- 
2.43.0


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

* Re: [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
  2025-04-09 21:35 [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' Mario Limonciello
@ 2025-04-10  8:03 ` Shyam Sundar S K
  2025-04-10 12:50 ` Rafael J. Wysocki
  1 sibling, 0 replies; 4+ messages in thread
From: Shyam Sundar S K @ 2025-04-10  8:03 UTC (permalink / raw)
  To: Mario Limonciello, Rafael J . Wysocki
  Cc: Linus Walleij, open list:PIN CONTROL SUBSYSTEM, open list,
	linux-acpi, Basavaraj Natikar, Mario Limonciello,
	kernel test robot



On 4/10/2025 03:05, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
> `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
> 
> Adjust checks to look for both.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Looks good to me.

Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

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

* Re: [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
  2025-04-09 21:35 [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' Mario Limonciello
  2025-04-10  8:03 ` Shyam Sundar S K
@ 2025-04-10 12:50 ` Rafael J. Wysocki
  2025-04-10 20:28   ` Mario Limonciello
  1 sibling, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-04-10 12:50 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Rafael J . Wysocki, Linus Walleij,
	open list:PIN CONTROL SUBSYSTEM, open list, linux-acpi,
	Basavaraj Natikar, Shyam Sundar S K, Mario Limonciello,
	kernel test robot

On Wed, Apr 9, 2025 at 11:35 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
> `CONFIG_PM_SLEEP` so the functions that use it need the same scope.

Shouldn't this be CONFIG_SUSPEND given what's going on in acpi.h?

Also, there is one more report regarding pinctrl_dev being unused:

https://lore.kernel.org/linux-acpi/202504101106.hPCEcoHr-lkp@intel.com/T/#u

Any chance to address all of this in one patch?

> Adjust checks to look for both.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/pinctrl/pinctrl-amd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
> index b6fafed79b289..472a5aed4cd05 100644
> --- a/drivers/pinctrl/pinctrl-amd.c
> +++ b/drivers/pinctrl/pinctrl-amd.c
> @@ -1209,7 +1209,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
>
>         platform_set_drvdata(pdev, gpio_dev);
>         acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
> -#ifdef CONFIG_ACPI
> +#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
>         acpi_register_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
>  #endif
>
> @@ -1230,7 +1230,7 @@ static void amd_gpio_remove(struct platform_device *pdev)
>
>         gpiochip_remove(&gpio_dev->gc);
>         acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
> -#ifdef CONFIG_ACPI
> +#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
>         acpi_unregister_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
>  #endif
>  }
> --
> 2.43.0
>
>

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

* Re: [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
  2025-04-10 12:50 ` Rafael J. Wysocki
@ 2025-04-10 20:28   ` Mario Limonciello
  0 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2025-04-10 20:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J . Wysocki, Linus Walleij,
	open list:PIN CONTROL SUBSYSTEM, open list, linux-acpi,
	Basavaraj Natikar, Shyam Sundar S K, Mario Limonciello,
	kernel test robot

On 4/10/2025 7:50 AM, Rafael J. Wysocki wrote:
> On Wed, Apr 9, 2025 at 11:35 PM Mario Limonciello <superm1@kernel.org> wrote:
>>
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
>> `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
> 
> Shouldn't this be CONFIG_SUSPEND given what's going on in acpi.h?

Really - I think we probably should change all of pinctrl-amd.c to use 
CONFIG_SUSPEND.

> 
> Also, there is one more report regarding pinctrl_dev being unused:
> 
> https://lore.kernel.org/linux-acpi/202504101106.hPCEcoHr-lkp@intel.com/T/#u
> 
> Any chance to address all of this in one patch?

Sure; I'll spin again and get something out to cover both cases soon.

> 
>> Adjust checks to look for both.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>>   drivers/pinctrl/pinctrl-amd.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
>> index b6fafed79b289..472a5aed4cd05 100644
>> --- a/drivers/pinctrl/pinctrl-amd.c
>> +++ b/drivers/pinctrl/pinctrl-amd.c
>> @@ -1209,7 +1209,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
>>
>>          platform_set_drvdata(pdev, gpio_dev);
>>          acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
>> -#ifdef CONFIG_ACPI
>> +#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
>>          acpi_register_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
>>   #endif
>>
>> @@ -1230,7 +1230,7 @@ static void amd_gpio_remove(struct platform_device *pdev)
>>
>>          gpiochip_remove(&gpio_dev->gc);
>>          acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
>> -#ifdef CONFIG_ACPI
>> +#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
>>          acpi_unregister_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
>>   #endif
>>   }
>> --
>> 2.43.0
>>
>>


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

end of thread, other threads:[~2025-04-10 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 21:35 [PATCH] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' Mario Limonciello
2025-04-10  8:03 ` Shyam Sundar S K
2025-04-10 12:50 ` Rafael J. Wysocki
2025-04-10 20:28   ` Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).