All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Patch "clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()" has been added to the 5.15-stable tree
       [not found] <20220906032831.1115256-1-sashal@kernel.org>
@ 2022-09-06  5:01 ` Marion & Christophe JAILLET
  2022-09-06 13:30   ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Marion & Christophe JAILLET @ 2022-09-06  5:01 UTC (permalink / raw)
  To: Sasha Levin, stable-commits, stable; +Cc: Michael Turquette, Stephen Boyd


Le 06/09/2022 à 05:28, Sasha Levin a écrit :
> This is a note to let you know that I've just added the patch titled
>
>      clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()
>
> to the 5.15-stable tree which can be found at:
>      http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
>       clk-bcm-rpi-use-correct-order-for-the-parameters-of-.patch
> and it can be found in the queue-5.15 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.

Hi,

I'm not sure that such a patch deserve a backport.

It is correct, but it is just a clean-up that will be a no-op at runtime.
Should it help future potential backport, why not, but otherwise, IMHO, 
it could be dropped.

It is also in the 5.10 backport queue.

Just my 2c,

CJ


> commit f731681dfb26866e5e4130d27d27e00766f7e9d1
> Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Date:   Fri May 20 23:20:58 2022 +0200
>
>      clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()
>      
>      [ Upstream commit b7fa6242f3e035308a76284560e4f918dad9b017 ]
>      
>      We should have 'n', then 'size', not the opposite.
>      This is harmless because the 2 values are just multiplied, but having
>      the correct order silence a (unpublished yet) smatch warning.
>      
>      Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>      Link: https://lore.kernel.org/r/49d726d11964ca0e3757bdb5659e3b3eaa1572b5.1653081643.git.christophe.jaillet@wanadoo.fr
>      Signed-off-by: Stephen Boyd <sboyd@kernel.org>
>      Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
> index fda78a2f9ac50..97612860ce0e1 100644
> --- a/drivers/clk/bcm/clk-raspberrypi.c
> +++ b/drivers/clk/bcm/clk-raspberrypi.c
> @@ -252,7 +252,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
>   	int ret;
>   
>   	clks = devm_kcalloc(rpi->dev,
> -			    sizeof(*clks), RPI_FIRMWARE_NUM_CLK_ID,
> +			    RPI_FIRMWARE_NUM_CLK_ID, sizeof(*clks),
>   			    GFP_KERNEL);
>   	if (!clks)
>   		return -ENOMEM;

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

* Re: Patch "clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()" has been added to the 5.15-stable tree
  2022-09-06  5:01 ` Patch "clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()" has been added to the 5.15-stable tree Marion & Christophe JAILLET
@ 2022-09-06 13:30   ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2022-09-06 13:30 UTC (permalink / raw)
  To: Marion & Christophe JAILLET
  Cc: stable-commits, stable, Michael Turquette, Stephen Boyd

On Tue, Sep 06, 2022 at 07:01:16AM +0200, Marion & Christophe JAILLET wrote:
>
>Le 06/09/2022 à 05:28, Sasha Levin a écrit :
>>This is a note to let you know that I've just added the patch titled
>>
>>     clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()
>>
>>to the 5.15-stable tree which can be found at:
>>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>>
>>The filename of the patch is:
>>      clk-bcm-rpi-use-correct-order-for-the-parameters-of-.patch
>>and it can be found in the queue-5.15 subdirectory.
>>
>>If you, or anyone else, feels it should not be added to the stable tree,
>>please let <stable@vger.kernel.org> know about it.
>
>Hi,
>
>I'm not sure that such a patch deserve a backport.
>
>It is correct, but it is just a clean-up that will be a no-op at runtime.
>Should it help future potential backport, why not, but otherwise, 
>IMHO, it could be dropped.
>
>It is also in the 5.10 backport queue.

You're very much correct, it's only there for the benefit of
bc163555603e ("clk: bcm: rpi: Prevent out-of-bounds access") which
follows it :)

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2022-09-06 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220906032831.1115256-1-sashal@kernel.org>
2022-09-06  5:01 ` Patch "clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()" has been added to the 5.15-stable tree Marion & Christophe JAILLET
2022-09-06 13:30   ` Sasha Levin

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.