linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
@ 2020-03-02  7:50 Anson Huang
  2020-03-02  8:07 ` Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: Anson Huang @ 2020-03-02  7:50 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, amit.kucheria, shawnguo, s.hauer,
	kernel, festevam, linux-pm, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

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

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Changes since V1:
	- fix typo of commit message, simply->simplify.
---
 drivers/thermal/imx_thermal.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index bb6754a..e75dda5 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -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);
-- 
2.7.4


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

* Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
  2020-03-02  7:50 [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP Anson Huang
@ 2020-03-02  8:07 ` Uwe Kleine-König
  2020-03-02  8:26   ` Anson Huang
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2020-03-02  8:07 UTC (permalink / raw)
  To: Anson Huang
  Cc: rui.zhang, daniel.lezcano, amit.kucheria, shawnguo, s.hauer,
	kernel, festevam, linux-pm, linux-arm-kernel, linux-kernel,
	Linux-imx

On Mon, Mar 02, 2020 at 03:50:10PM +0800, Anson Huang wrote:
> Use __maybe_unused for power management related functions instead
> of #if CONFIG_PM_SLEEP to simplify the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

Best regards
Uwe

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

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

* RE: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
  2020-03-02  8:07 ` Uwe Kleine-König
@ 2020-03-02  8:26   ` Anson Huang
  2020-03-02  8:54     ` Daniel Lezcano
  0 siblings, 1 reply; 6+ messages in thread
From: Anson Huang @ 2020-03-02  8:26 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: rui.zhang, daniel.lezcano, amit.kucheria, shawnguo, s.hauer,
	kernel, festevam, linux-pm, linux-arm-kernel, linux-kernel,
	dl-linux-imx

Hi, Uwe


> 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:
> > Use __maybe_unused for power management related functions instead of
> > #if CONFIG_PM_SLEEP to simplify the code.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> 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

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

* Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
  2020-03-02  8:26   ` Anson Huang
@ 2020-03-02  8:54     ` Daniel Lezcano
  2020-03-02  9:00       ` Anson Huang
  2020-03-02  9:01       ` Uwe Kleine-König
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Lezcano @ 2020-03-02  8:54 UTC (permalink / raw)
  To: Anson Huang, Uwe Kleine-König
  Cc: rui.zhang, amit.kucheria, shawnguo, s.hauer, kernel, festevam,
	linux-pm, linux-arm-kernel, linux-kernel, dl-linux-imx

On 02/03/2020 09:26, Anson Huang wrote:
> Hi, Uwe
> 
> 
>> 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:
>>> Use __maybe_unused for power management related functions instead of
>>> #if CONFIG_PM_SLEEP to simplify the code.
>>>
>>> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>>> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>
>> 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.


-- 
 <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


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

* RE: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
  2020-03-02  8:54     ` Daniel Lezcano
@ 2020-03-02  9:00       ` Anson Huang
  2020-03-02  9:01       ` Uwe Kleine-König
  1 sibling, 0 replies; 6+ messages in thread
From: Anson Huang @ 2020-03-02  9:00 UTC (permalink / raw)
  To: Daniel Lezcano, Uwe Kleine-König
  Cc: rui.zhang, amit.kucheria, shawnguo, s.hauer, kernel, festevam,
	linux-pm, linux-arm-kernel, linux-kernel, dl-linux-imx



> Subject: Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead
> of CONFIG_PM_SLEEP
> 
> On 02/03/2020 09:26, Anson Huang wrote:
> > Hi, Uwe
> >
> >
> >> 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:
> >>> Use __maybe_unused for power management related functions instead
> of
> >>> #if CONFIG_PM_SLEEP to simplify the code.
> >>>
> >>> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >>> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >>
> >> 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.

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

Anson

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

* Re: [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP
  2020-03-02  8:54     ` Daniel Lezcano
  2020-03-02  9:00       ` Anson Huang
@ 2020-03-02  9:01       ` Uwe Kleine-König
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2020-03-02  9:01 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Anson Huang, amit.kucheria, linux-pm, shawnguo, s.hauer,
	linux-kernel, dl-linux-imx, kernel, rui.zhang, festevam,
	linux-arm-kernel

On Mon, Mar 02, 2020 at 09:54:34AM +0100, Daniel Lezcano wrote:
> On 02/03/2020 09:26, Anson Huang wrote:
> > Hi, Uwe
> > 
> > 
> >> 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:
> >>> Use __maybe_unused for power management related functions instead of
> >>> #if CONFIG_PM_SLEEP to simplify the code.
> >>>
> >>> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >>> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >>
> >> 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.

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

Best regards
Uwe

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

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

end of thread, other threads:[~2020-03-02  9:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  7:50 [PATCH V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP Anson Huang
2020-03-02  8:07 ` Uwe Kleine-König
2020-03-02  8:26   ` Anson Huang
2020-03-02  8:54     ` Daniel Lezcano
2020-03-02  9:00       ` Anson Huang
2020-03-02  9:01       ` Uwe Kleine-König

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).