mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Shen Lichuan <shenlichuan@vivo.com>
Cc: geert+renesas@glider.be, linus.walleij@linaro.org,
	linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v1] drivers/pinctrl/renesas: Switch to use kmemdup_array()
Date: Fri, 23 Aug 2024 18:22:37 +0300	[thread overview]
Message-ID: <ZsipPZz7O0yrOHE9@black.fi.intel.com> (raw)
In-Reply-To: <20240822061438.14617-1-shenlichuan@vivo.com>

On Thu, Aug 22, 2024 at 02:14:38PM +0800, Shen Lichuan wrote:
> Let the kememdup_array() take care about
> multiplication and possible overflows.

> +	cfgs = kmemdup_array(configs, num_configs,
> +				sizeof(*cfgs), GFP_KERNEL);

Geert, don't you want to fix the indentation issues?
Perhaps even combining these to a single line?

...

> +	cfgs = kmemdup_array(configs, num_configs,
> +				sizeof(*cfgs), GFP_KERNEL);
>  	if (!cfgs)
>  		return -ENOMEM;

Ditto.

...

> +	cfgs = kmemdup_array(configs, num_configs,
> +				sizeof(*cfgs), GFP_KERNEL);

Ditto.

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2024-08-23 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  6:14 Shen Lichuan
2024-08-23 12:42 ` Geert Uytterhoeven
2024-08-23 15:22 ` Andy Shevchenko [this message]
2024-08-23 15:30   ` Geert Uytterhoeven

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=ZsipPZz7O0yrOHE9@black.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=shenlichuan@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

all inboxes | Powered by JetHome®