Skip to contentSkip to conversation

mfd: Avoid unused variable 'atmel_flexcom_pm_ops' warning

PATCH In review Aashish Sharma 4 participants 4 messages Feb 25, 2022 – Feb 28, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: Avoid unused variable 'atmel_flexcom_pm_ops' warning

Fix this kernel test robot warning:

drivers/mfd/atmel-flexcom.c:108:32: warning: unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]

The variable atmel_flexcom_pm_ops is unused when CONFIG_PM is not selected, so marking it as __maybe_unsed.

---
 drivers/mfd/atmel-flexcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/atmel-flexcom.c +1 -1
index 559eb4d352b6..33caa4fba6af 100644
@@ -105,7 +105,7 @@ static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops atmel_flexcom_pm_ops = {
+static const struct dev_pm_ops __maybe_unused atmel_flexcom_pm_ops = {
 	.resume_noirq = atmel_flexcom_resume_noirq,
 };
 
Signature · 1 line
2.35.1.574.g5d30c73bfb-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Aashish Sharma

Fix this kernel test robot warning:

drivers/mfd/atmel-flexcom.c:108:32: warning: unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]

The variable atmel_flexcom_pm_ops is unused when CONFIG_PM is not selected, so marking it as __maybe_unsed.

Quoted 20 lines
---
 drivers/mfd/atmel-flexcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/atmel-flexcom.c +1 -2
index 559eb4d352b6..33caa4fba6af 100644
@@ -105,7 +105,7 @@ static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
        return 0;
 }
 
-static const struct dev_pm_ops atmel_flexcom_pm_ops = {
+static const struct dev_pm_ops __maybe_unused atmel_flexcom_pm_ops = {
        .resume_noirq = atmel_flexcom_resume_noirq,
 };
 
--

2.35.1.574.g5d30c73bfb-goog

#2 lore raw
Quoted 9 lines · Guenter Roeck

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 6 lines · Aashish Sharma

Fix this kernel test robot warning:

drivers/mfd/atmel-flexcom.c:108:32: warning: unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]

Quoted 6 lines
Quoted 4 lines

The variable atmel_flexcom_pm_ops is unused when CONFIG_PM is not selected, so marking it as __maybe_unsed.

There is already [1] posted a while ago...

[1] https://lkml.org/lkml/2021/12/7/474

Quoted 26 lines
Quoted 19 lines
---
 drivers/mfd/atmel-flexcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/atmel-flexcom.c +1 -2
index 559eb4d352b6..33caa4fba6af 100644
@@ -105,7 +105,7 @@ static int __maybe_unused atmel_flexcom_resume_noirq(struct device *dev)
        return 0;
 }
 
-static const struct dev_pm_ops atmel_flexcom_pm_ops = {
+static const struct dev_pm_ops __maybe_unused atmel_flexcom_pm_ops = {
        .resume_noirq = atmel_flexcom_resume_noirq,
 };
 
--
Quoted 2 lines

2.35.1.574.g5d30c73bfb-goog

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw
Quoted 13 lines · On Mon, 28 Feb 2022, [email protected] wrote:
Quoted 12 lines · Guenter Roeck

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 9 lines · Aashish Sharma

Fix this kernel test robot warning:

drivers/mfd/atmel-flexcom.c:108:32: warning: unused variable 'atmel_flexcom_pm_ops' [-Wunused-const-variable]

The variable atmel_flexcom_pm_ops is unused when CONFIG_PM is not selected, so marking it as __maybe_unsed.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

There is already [1] posted a while ago...

[1] https://lkml.org/lkml/2021/12/7/474

Lost in the ether!

If this happens again, please resubmit a [RESEND].

Applied now though, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog