* [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource()
@ 2023-03-08 6:03 Yang Li
2023-03-08 8:37 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Yang Li @ 2023-03-08 6:03 UTC (permalink / raw)
To: niklas.soderlund
Cc: rafael, daniel.lezcano, amitk, rui.zhang, linux-renesas-soc,
linux-pm, linux-kernel, Yang Li
According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to Use
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/thermal/rcar_thermal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index b8571f7090aa..ee2dde1fbe2a 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -435,9 +435,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
* Then, driver uses common registers
* rcar_has_irq_support() will be enabled
*/
- res = platform_get_resource(pdev, IORESOURCE_MEM,
- mres++);
- common->base = devm_ioremap_resource(dev, res);
+ common->base = devm_platform_ioremap_resource(pdev, mres++);
if (IS_ERR(common->base)) {
ret = PTR_ERR(common->base);
goto error_unregister;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource()
2023-03-08 6:03 [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource() Yang Li
@ 2023-03-08 8:37 ` Geert Uytterhoeven
2023-03-08 12:16 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-03-08 8:37 UTC (permalink / raw)
To: Yang Li
Cc: niklas.soderlund, rafael, daniel.lezcano, amitk, rui.zhang,
linux-renesas-soc, linux-pm, linux-kernel
Hi Yang,
On Wed, Mar 8, 2023 at 7:17 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
> According to commit 7945f929f1a7 ("drivers: provide
> devm_platform_ioremap_resource()"), convert platform_get_resource(),
> devm_ioremap_resource() to a single call to Use
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
Thanks for your patch!
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -435,9 +435,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> * Then, driver uses common registers
> * rcar_has_irq_support() will be enabled
> */
> - res = platform_get_resource(pdev, IORESOURCE_MEM,
> - mres++);
> - common->base = devm_ioremap_resource(dev, res);
> + common->base = devm_platform_ioremap_resource(pdev, mres++);
> if (IS_ERR(common->base)) {
> ret = PTR_ERR(common->base);
> goto error_unregister;
Note that there is a second opportunity for conversion in the same
function, a few lines below.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource()
2023-03-08 8:37 ` Geert Uytterhoeven
@ 2023-03-08 12:16 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-03-08 12:16 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Yang Li, niklas.soderlund, rafael, daniel.lezcano, amitk,
rui.zhang, linux-renesas-soc, linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
> Note that there is a second opportunity for conversion in the same
> function, a few lines below.
This should be fixed in a V2, then, not in an incremental patch, please.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-08 12:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 6:03 [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource() Yang Li
2023-03-08 8:37 ` Geert Uytterhoeven
2023-03-08 12:16 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox