From: Lee Jones <lee@kernel.org>
To: Yangtao Li <frank.li@vivo.com>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: ip30: Convert to devm_platform_ioremap_resource()
Date: Thu, 13 Jul 2023 11:22:44 +0100 [thread overview]
Message-ID: <20230713102244.GO10768@google.com> (raw)
In-Reply-To: <20230704094745.25665-1-frank.li@vivo.com>
On Tue, 04 Jul 2023, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/leds/leds-ip30.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/leds/leds-ip30.c b/drivers/leds/leds-ip30.c
> index 1f952bad0fe8..2df24c303366 100644
> --- a/drivers/leds/leds-ip30.c
> +++ b/drivers/leds/leds-ip30.c
> @@ -27,22 +27,16 @@ static void ip30led_set(struct led_classdev *led_cdev,
>
> static int ip30led_create(struct platform_device *pdev, int num)
> {
> - struct resource *res;
> struct ip30_led *data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, num);
> - if (!res)
> - return -EBUSY;
> -
> data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> - data->reg = devm_ioremap_resource(&pdev->dev, res);
> + data->reg = devm_platform_ioremap_resource(pdev, num);
> if (IS_ERR(data->reg))
> return PTR_ERR(data->reg);
>
> -
You're not supposed to do that. Separate patch in future please.
But I cannot review what I do not see!
Applied, thanks
--
Lee Jones [李琼斯]
prev parent reply other threads:[~2023-07-13 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 9:47 [PATCH] leds: ip30: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-13 10:22 ` Lee Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230713102244.GO10768@google.com \
--to=lee@kernel.org \
--cc=frank.li@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox