All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: zpershuai <zpershuai@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-spi@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix some wrong goto jumps for avoiding memory leak.
Date: Sat, 12 Jun 2021 21:57:03 +0200	[thread overview]
Message-ID: <CAFBinCD+9asM9-+kGEa3PhurxGqP9UwmP4aNCN9gNQPeMUyhiQ@mail.gmail.com> (raw)
In-Reply-To: <1623248538-4352-1-git-send-email-zpershuai@gmail.com>

Hello,

On Wed, Jun 9, 2021 at 4:22 PM zpershuai <zpershuai@gmail.com> wrote:
>
> In meson_spifc_probe function, when  enable the device pclk clock is
> error, it should use clk_disable_unprepare to release the core clock.
>
> And when meson_spicc_clk_init returns failed,  it should goto the
> out_clk label.
After reviewing your patch I agree with your findings!
So thank you very much for bringing this up and sending a fix

The subject of this patch does not match what we usually have
Can you please make it start with "spi: meson-spicc:" (see git log
drivers/spi/spi-meson-spicc.c)

[...]
>         device_reset_optional(&pdev->dev);
> @@ -752,7 +752,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>         ret = meson_spicc_clk_init(spicc);
>         if (ret) {
>                 dev_err(&pdev->dev, "clock registration failed\n");
> -               goto out_master;
> +               goto out_clk;
>         }
I'd prefer this part to go into a separate patch so that separate
patch can get the following Fixes tag (which should then be added
above your Signed-off-by):
Fixes: 3e0cf4d3fc29 ("spi: meson-spicc: add a linear clock divider support")

The remaining changes (to my understanding) should get:
Fixes: 454fa271bc4e ("spi: Add Meson SPICC driver")

The "Fixes" tag is relevant so bug-fixes can be backported to older
kernel versions automatically.

So it would be great if you could send a second version with the above
changes considered.


Thank you and best regards,
Martin

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

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: zpershuai <zpershuai@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix some wrong goto jumps for avoiding memory leak.
Date: Sat, 12 Jun 2021 21:57:03 +0200	[thread overview]
Message-ID: <CAFBinCD+9asM9-+kGEa3PhurxGqP9UwmP4aNCN9gNQPeMUyhiQ@mail.gmail.com> (raw)
In-Reply-To: <1623248538-4352-1-git-send-email-zpershuai@gmail.com>

Hello,

On Wed, Jun 9, 2021 at 4:22 PM zpershuai <zpershuai@gmail.com> wrote:
>
> In meson_spifc_probe function, when  enable the device pclk clock is
> error, it should use clk_disable_unprepare to release the core clock.
>
> And when meson_spicc_clk_init returns failed,  it should goto the
> out_clk label.
After reviewing your patch I agree with your findings!
So thank you very much for bringing this up and sending a fix

The subject of this patch does not match what we usually have
Can you please make it start with "spi: meson-spicc:" (see git log
drivers/spi/spi-meson-spicc.c)

[...]
>         device_reset_optional(&pdev->dev);
> @@ -752,7 +752,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>         ret = meson_spicc_clk_init(spicc);
>         if (ret) {
>                 dev_err(&pdev->dev, "clock registration failed\n");
> -               goto out_master;
> +               goto out_clk;
>         }
I'd prefer this part to go into a separate patch so that separate
patch can get the following Fixes tag (which should then be added
above your Signed-off-by):
Fixes: 3e0cf4d3fc29 ("spi: meson-spicc: add a linear clock divider support")

The remaining changes (to my understanding) should get:
Fixes: 454fa271bc4e ("spi: Add Meson SPICC driver")

The "Fixes" tag is relevant so bug-fixes can be backported to older
kernel versions automatically.

So it would be great if you could send a second version with the above
changes considered.


Thank you and best regards,
Martin

WARNING: multiple messages have this Message-ID (diff)
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: zpershuai <zpershuai@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-spi@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix some wrong goto jumps for avoiding memory leak.
Date: Sat, 12 Jun 2021 21:57:03 +0200	[thread overview]
Message-ID: <CAFBinCD+9asM9-+kGEa3PhurxGqP9UwmP4aNCN9gNQPeMUyhiQ@mail.gmail.com> (raw)
In-Reply-To: <1623248538-4352-1-git-send-email-zpershuai@gmail.com>

Hello,

On Wed, Jun 9, 2021 at 4:22 PM zpershuai <zpershuai@gmail.com> wrote:
>
> In meson_spifc_probe function, when  enable the device pclk clock is
> error, it should use clk_disable_unprepare to release the core clock.
>
> And when meson_spicc_clk_init returns failed,  it should goto the
> out_clk label.
After reviewing your patch I agree with your findings!
So thank you very much for bringing this up and sending a fix

The subject of this patch does not match what we usually have
Can you please make it start with "spi: meson-spicc:" (see git log
drivers/spi/spi-meson-spicc.c)

[...]
>         device_reset_optional(&pdev->dev);
> @@ -752,7 +752,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>         ret = meson_spicc_clk_init(spicc);
>         if (ret) {
>                 dev_err(&pdev->dev, "clock registration failed\n");
> -               goto out_master;
> +               goto out_clk;
>         }
I'd prefer this part to go into a separate patch so that separate
patch can get the following Fixes tag (which should then be added
above your Signed-off-by):
Fixes: 3e0cf4d3fc29 ("spi: meson-spicc: add a linear clock divider support")

The remaining changes (to my understanding) should get:
Fixes: 454fa271bc4e ("spi: Add Meson SPICC driver")

The "Fixes" tag is relevant so bug-fixes can be backported to older
kernel versions automatically.

So it would be great if you could send a second version with the above
changes considered.


Thank you and best regards,
Martin

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

  reply	other threads:[~2021-06-12 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 14:22 [PATCH] Fix some wrong goto jumps for avoiding memory leak zpershuai
2021-06-09 14:22 ` zpershuai
2021-06-09 14:22 ` zpershuai
2021-06-12 19:57 ` Martin Blumenstingl [this message]
2021-06-12 19:57   ` Martin Blumenstingl
2021-06-12 19:57   ` Martin Blumenstingl

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=CAFBinCD+9asM9-+kGEa3PhurxGqP9UwmP4aNCN9gNQPeMUyhiQ@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=broonie@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=zpershuai@gmail.com \
    /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.