Skip to contentSkip to conversation

thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

PATCH Superseded Anson Huang 3 participants 6 messages Mar 2, 2020

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

---
Changes since V1:
- fix typo of commit message, simply->simplify.

---
 drivers/thermal/imx_thermal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/thermal/imx_thermal.c +2 -4
index bb6754a..e75dda5 100644
@@ -878,8 +878,7 @@ static int imx_thermal_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int imx_thermal_suspend(struct device *dev)
+static int __maybe_unused imx_thermal_suspend(struct device *dev)
 {
 	struct imx_thermal_data *data = dev_get_drvdata(dev);
 	struct regmap *map = data->tempmon;
@@ -900,7 +899,7 @@ static int imx_thermal_suspend(struct device *dev)
 	return 0;
 }
 
-static int imx_thermal_resume(struct device *dev)
+static int __maybe_unused imx_thermal_resume(struct device *dev)
 {
 	struct imx_thermal_data *data = dev_get_drvdata(dev);
 	struct regmap *map = data->tempmon;
@@ -918,7 +917,6 @@ static int imx_thermal_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(imx_thermal_pm_ops,
 			 imx_thermal_suspend, imx_thermal_resume);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Anson Huang

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

IMHO translating my "otherwise looks fine" in a "Reviewed-by" is a bit bold. Please don't assume this.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#2 lore raw

Hi, Uwe

Quoted 4 lines

Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

On Mon, Mar 02, 2020 at 03:50:10PM +0800, Anson Huang wrote:

Quoted 8 lines
Quoted 5 lines

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

IMHO translating my "otherwise looks fine" in a "Reviewed-by" is a bit bold. Please don't assume this.

OK, will keep it in mind next time, thanks.

Anson

#3 lore raw
Quoted 10 lines · Anson Huang

Hi, Uwe

Quoted 7 lines

Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Quoted 3 lines · Anson Huang

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

IMHO translating my "otherwise looks fine" in a "Reviewed-by" is a bit bold. Please don't assume this.

OK, will keep it in mind next time, thanks.

When applying a patch, now we add the link to the lkml archive automatically. I can't apply this patch if the Reviewed-by is not accepted.

Or the Reviewed-by tag is confirmed or a V3 without the Reviewed-by must be resent.

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#4 lore raw
Quoted 24 lines

Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Quoted 8 lines · Anson Huang

Hi, Uwe

Quoted 5 lines

Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Quoted 1 line · Anson Huang

Use __maybe_unused for power management related functions instead

of

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

#if CONFIG_PM_SLEEP to simplify the code.

IMHO translating my "otherwise looks fine" in a "Reviewed-by" is a bit

bold.

Quoted 2 lines
Quoted 1 line

Please don't assume this.

Quoted 7 lines
Quoted 1 line

OK, will keep it in mind next time, thanks.

When applying a patch, now we add the link to the lkml archive automatically. I can't apply this patch if the Reviewed-by is not accepted.

Or the Reviewed-by tag is confirmed or a V3 without the Reviewed-by must be resent.

I just sent a V3 patch to drop the reviewed-by tag, thanks.

Anson

#5 lore raw
In reply to Daniel Lezcano
Quoted 17 lines · Daniel Lezcano
Quoted 16 lines · Anson Huang

Hi, Uwe

Quoted 12 lines

Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP

Quoted 5 lines · Anson Huang

Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simplify the code.

IMHO translating my "otherwise looks fine" in a "Reviewed-by" is a bit bold. Please don't assume this.

Quoted 7 lines
Quoted 1 line

OK, will keep it in mind next time, thanks.

When applying a patch, now we add the link to the lkml archive automatically. I can't apply this patch if the Reviewed-by is not accepted.

Or the Reviewed-by tag is confirmed or a V3 without the Reviewed-by must be resent.

I didn't look close enough to justify a Reviewed-by:, so "the Reviewed-by tag is confirmed" is ruled out.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |