From: Sidharth Seela <sidharthseela@gmail.com>
To: 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, skhan@linuxfoundation.org,
david.hunter.linux@gmail.com,
Sidharth Seela <sidharthseela@gmail.com>
Subject: [PATCH RESEND] clk: at91: sam9x7: Use kmalloc_array() instead of kmalloc()
Date: Wed, 24 Sep 2025 20:25:53 +0530 [thread overview]
Message-ID: <20250924145552.55058-1-sidharthseela@gmail.com> (raw)
Replace kmalloc with kmalloc array in clk/at91/sam9x7.c. Refactor to new
API, for cases with dynamic size calculations inside kmalloc().
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;
--
2.39.5 (Apple Git-154)
next reply other threads:[~2025-09-24 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 14:55 Sidharth Seela [this message]
2025-10-07 21:06 ` Shuah Khan
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=20250924145552.55058-1-sidharthseela@gmail.com \
--to=sidharthseela@gmail.com \
--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=skhan@linuxfoundation.org \
--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
all inboxes | Powered by JetHome®