From: Daniel Thompson <daniel@riscstar.com>
To: Qianfeng Rong <rongqianfeng@vivo.com>
Cc: Lee Jones <lee@kernel.org>, Daniel Thompson <danielt@kernel.org>,
Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backlight: led_bl: Use devm_kcalloc() for array space allocation
Date: Tue, 19 Aug 2025 14:20:20 +0100 [thread overview]
Message-ID: <aKR6FAYDrNDhY6Af@aspen.lan> (raw)
In-Reply-To: <20250819035804.433615-1-rongqianfeng@vivo.com>
On Tue, Aug 19, 2025 at 11:58:03AM +0800, Qianfeng Rong wrote:
> Replace calls of devm_kzalloc() with devm_kcalloc() in led_bl_get_leds()
> and led_bl_parse_levels() for safer memory allocation with built-in
> overflow protection.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
I assume you scanned drivers/video/backlight to look for similar code
patterns in other backlight drivers? If you did it would have been
really helpful to say so in this part of the patch (because in it's
absence I had to do that myself).
However, the code changes are fine:
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Daniel.
next prev parent reply other threads:[~2025-08-19 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 3:58 [PATCH] backlight: led_bl: Use devm_kcalloc() for array space allocation Qianfeng Rong
2025-08-19 13:20 ` Daniel Thompson [this message]
2025-08-19 13:29 ` Qianfeng Rong
2025-09-02 10:40 ` (subset) " Lee Jones
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=aKR6FAYDrNDhY6Af@aspen.lan \
--to=daniel@riscstar.com \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rongqianfeng@vivo.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