From: Shuah Khan <skhan@linuxfoundation.org>
To: Sidharth Seela <sidharthseela@gmail.com>,
mturquette@baylibre.com, sboyd@kernel.org,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev, varshini.rajendran@microchip.com
Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, david.hunter.linux@gmail.com,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH RESEND] clk: at91: sam9x7: Use kmalloc_array() instead of kmalloc()
Date: Tue, 7 Oct 2025 15:06:08 -0600 [thread overview]
Message-ID: <c87d45dc-d545-4359-9e2f-11e43a45859f@linuxfoundation.org> (raw)
In-Reply-To: <20250924145552.55058-1-sidharthseela@gmail.com>
On 9/24/25 08:55, Sidharth Seela wrote:
> Replace kmalloc with kmalloc array in clk/at91/sam9x7.c. Refactor to new
> API, for cases with dynamic size calculations inside kmalloc().
>
This following line doesn't belong in commit log.
Can you add details on how you tested this patch and also how
you found the problem to begin with.
> Resend is to correct previously sent patches mailing address.
>
> Signed-off-by: Sidharth Seela <sidharthseela@gmail.com>
> ---
> diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c
> index ffab32b047a0..0c0a746a183d 100644
> --- a/drivers/clk/at91/sam9x7.c
> +++ b/drivers/clk/at91/sam9x7.c
> @@ -748,9 +748,9 @@ static void __init sam9x7_pmc_setup(struct device_node *np)
> if (!sam9x7_pmc)
> return;
>
> - clk_mux_buffer = kmalloc(sizeof(void *) *
> - (ARRAY_SIZE(sam9x7_gck)),
> - GFP_KERNEL);
> + clk_mux_buffer = kmalloc_array(ARRAY_SIZE(sam9x7_gck),
> + sizeof(void *),
> + GFP_KERNEL);
> if (!clk_mux_buffer)
> goto err_free;
>
thanks,
-- Shuah
next prev parent reply other threads:[~2025-10-07 21:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 14:55 [PATCH RESEND] clk: at91: sam9x7: Use kmalloc_array() instead of kmalloc() Sidharth Seela
2025-10-07 21:06 ` Shuah Khan [this message]
2025-10-08 3:37 ` Sidharth Seela
2025-11-08 10:00 ` Claudiu Beznea
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=c87d45dc-d545-4359-9e2f-11e43a45859f@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=david.hunter.linux@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nicolas.ferre@microchip.com \
--cc=sboyd@kernel.org \
--cc=sidharthseela@gmail.com \
--cc=varshini.rajendran@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox