mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: zhang.enpei@zte.com.cn
Cc: horia.geanta@nxp.com, pankaj.gupta@nxp.com, gaurav.jain@nxp.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: caam - switch to use devm_kmemdup_array()
Date: Tue, 22 Jul 2025 19:03:54 +0200	[thread overview]
Message-ID: <ac2ace68-e88f-4055-9b01-45a2eaab50fc@wanadoo.fr> (raw)
In-Reply-To: <20250721100618249bnR0yTtsh0IeGzAdt8Fuu@zte.com.cn>

Le 21/07/2025 à 04:06, zhang.enpei@zte.com.cn a écrit :
> Thanks for the review!
> devm_kmemdup_array() will call size_mul() to combine its third and fourth parameters into
> length for devm_kmemdup(). So keep the same value sizeof(data->clks[0]) here as before.
> 
> 

sizeof(data->clks[0]) and sizeof(*data->clks) are the same.

But the second version is the preferred style. See [1].

So while touching these lines of code, updating the style looked a good 
idea to me.

CJ


[1]: 
https://docs.kernel.org/6.15/process/coding-style.html#allocating-memory

      reply	other threads:[~2025-07-22 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19  8:34 zhang.enpei
2025-07-19 13:00 ` Christophe JAILLET
2025-07-21  2:06   ` zhang.enpei
2025-07-22 17:03     ` Christophe JAILLET [this message]

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=ac2ace68-e88f-4055-9b01-45a2eaab50fc@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=zhang.enpei@zte.com.cn \
    /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®