All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>, Arnd Bergmann <arnd@arndb.de>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Himanshu Jha <himanshujha199640@gmail.com>,
	Jun Nie <jun.nie@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: zx: Use devm_platform_ioremap_resource() in zx296702_pd_probe()
Date: Mon, 07 Oct 2019 11:58:24 +0000	[thread overview]
Message-ID: <20191007115822.GH7150@dragon> (raw)
In-Reply-To: <30b6c588-6c4b-c8ff-6414-a3fc53867bfe@web.de>

On Wed, Sep 18, 2019 at 07:57:05AM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 18 Sep 2019 07:40:26 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Shawn Guo <shawnguo@kernel.org>

@Arnd, can you please help apply it to arm-soc tree?

Shawn

> ---
>  arch/arm/mach-zx/zx296702-pm-domain.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
> index 7a08bf9dd792..ba4f556b7a13 100644
> --- a/arch/arm/mach-zx/zx296702-pm-domain.c
> +++ b/arch/arm/mach-zx/zx296702-pm-domain.c
> @@ -152,7 +152,6 @@ static struct generic_pm_domain *zx296702_pm_domains[] = {
>  static int zx296702_pd_probe(struct platform_device *pdev)
>  {
>  	struct genpd_onecell_data *genpd_data;
> -	struct resource *res;
>  	int i;
> 
>  	genpd_data = devm_kzalloc(&pdev->dev, sizeof(*genpd_data), GFP_KERNEL);
> @@ -161,14 +160,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
> 
>  	genpd_data->domains = zx296702_pm_domains;
>  	genpd_data->num_domains = ARRAY_SIZE(zx296702_pm_domains);
> -
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no memory resource defined\n");
> -		return -ENODEV;
> -	}
> -
> -	pcubase = devm_ioremap_resource(&pdev->dev, res);
> +	pcubase = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(pcubase)) {
>  		dev_err(&pdev->dev, "ioremap fail.\n");
>  		return -EIO;
> --
> 2.23.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>, Arnd Bergmann <arnd@arndb.de>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Himanshu Jha <himanshujha199640@gmail.com>,
	Jun Nie <jun.nie@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: zx: Use devm_platform_ioremap_resource() in zx296702_pd_probe()
Date: Mon, 7 Oct 2019 19:58:24 +0800	[thread overview]
Message-ID: <20191007115822.GH7150@dragon> (raw)
In-Reply-To: <30b6c588-6c4b-c8ff-6414-a3fc53867bfe@web.de>

On Wed, Sep 18, 2019 at 07:57:05AM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 18 Sep 2019 07:40:26 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Shawn Guo <shawnguo@kernel.org>

@Arnd, can you please help apply it to arm-soc tree?

Shawn

> ---
>  arch/arm/mach-zx/zx296702-pm-domain.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
> index 7a08bf9dd792..ba4f556b7a13 100644
> --- a/arch/arm/mach-zx/zx296702-pm-domain.c
> +++ b/arch/arm/mach-zx/zx296702-pm-domain.c
> @@ -152,7 +152,6 @@ static struct generic_pm_domain *zx296702_pm_domains[] = {
>  static int zx296702_pd_probe(struct platform_device *pdev)
>  {
>  	struct genpd_onecell_data *genpd_data;
> -	struct resource *res;
>  	int i;
> 
>  	genpd_data = devm_kzalloc(&pdev->dev, sizeof(*genpd_data), GFP_KERNEL);
> @@ -161,14 +160,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
> 
>  	genpd_data->domains = zx296702_pm_domains;
>  	genpd_data->num_domains = ARRAY_SIZE(zx296702_pm_domains);
> -
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no memory resource defined\n");
> -		return -ENODEV;
> -	}
> -
> -	pcubase = devm_ioremap_resource(&pdev->dev, res);
> +	pcubase = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(pcubase)) {
>  		dev_err(&pdev->dev, "ioremap fail.\n");
>  		return -EIO;
> --
> 2.23.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Jun Nie <jun.nie@linaro.org>,
	Russell King <linux@armlinux.org.uk>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Himanshu Jha <himanshujha199640@gmail.com>
Subject: Re: [PATCH] ARM: zx: Use devm_platform_ioremap_resource() in zx296702_pd_probe()
Date: Mon, 7 Oct 2019 19:58:24 +0800	[thread overview]
Message-ID: <20191007115822.GH7150@dragon> (raw)
In-Reply-To: <30b6c588-6c4b-c8ff-6414-a3fc53867bfe@web.de>

On Wed, Sep 18, 2019 at 07:57:05AM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 18 Sep 2019 07:40:26 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Shawn Guo <shawnguo@kernel.org>

@Arnd, can you please help apply it to arm-soc tree?

Shawn

> ---
>  arch/arm/mach-zx/zx296702-pm-domain.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
> index 7a08bf9dd792..ba4f556b7a13 100644
> --- a/arch/arm/mach-zx/zx296702-pm-domain.c
> +++ b/arch/arm/mach-zx/zx296702-pm-domain.c
> @@ -152,7 +152,6 @@ static struct generic_pm_domain *zx296702_pm_domains[] = {
>  static int zx296702_pd_probe(struct platform_device *pdev)
>  {
>  	struct genpd_onecell_data *genpd_data;
> -	struct resource *res;
>  	int i;
> 
>  	genpd_data = devm_kzalloc(&pdev->dev, sizeof(*genpd_data), GFP_KERNEL);
> @@ -161,14 +160,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
> 
>  	genpd_data->domains = zx296702_pm_domains;
>  	genpd_data->num_domains = ARRAY_SIZE(zx296702_pm_domains);
> -
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no memory resource defined\n");
> -		return -ENODEV;
> -	}
> -
> -	pcubase = devm_ioremap_resource(&pdev->dev, res);
> +	pcubase = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(pcubase)) {
>  		dev_err(&pdev->dev, "ioremap fail.\n");
>  		return -EIO;
> --
> 2.23.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-07 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  5:57 [PATCH] ARM: zx: Use devm_platform_ioremap_resource() in zx296702_pd_probe() Markus Elfring
2019-09-18  5:57 ` Markus Elfring
2019-09-18  5:57 ` Markus Elfring
2019-10-07 11:58 ` Shawn Guo [this message]
2019-10-07 11:58   ` Shawn Guo
2019-10-07 11:58   ` Shawn Guo

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=20191007115822.GH7150@dragon \
    --to=shawnguo@kernel.org \
    --cc=Markus.Elfring@web.de \
    --cc=arnd@arndb.de \
    --cc=brgl@bgdev.pl \
    --cc=himanshujha199640@gmail.com \
    --cc=jun.nie@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.