From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Yu Jiaoliang <yujiaoliang@vivo.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v1] pinctrl: nomadik: Use kmemdup_array instead of kmemdup for multiple allocation
Date: Fri, 23 Aug 2024 18:27:38 +0300 [thread overview]
Message-ID: <ZsiqasBNAdVWKrjf@black.fi.intel.com> (raw)
In-Reply-To: <20240821064958.4059221-1-yujiaoliang@vivo.com>
On Wed, Aug 21, 2024 at 02:49:58PM +0800, Yu Jiaoliang wrote:
> Let the kememdup_array() take care about multiplication and possible
kmemdup_array()
> overflows.
...
> + dup_configs = kmemdup_array(configs, num_configs, sizeof(*dup_configs),
> + GFP_KERNEL);
I would even make this a single line.
...
> + dup_configs = kmemdup_array(configs, num_configs, sizeof(*dup_configs),
> + GFP_KERNEL);
Ditto.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-08-23 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 6:49 [PATCH v1] pinctrl: nomadik: Use kmemdup_array instead of kmemdup for multiple allocation Yu Jiaoliang
2024-08-23 15:27 ` Andy Shevchenko [this message]
2024-08-26 7:42 ` 于佼良
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=ZsiqasBNAdVWKrjf@black.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=yujiaoliang@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