[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3c848f9-d825-f9ff-eb6e-a3575d9871ff@wanadoo.fr>
Date: Tue, 22 Nov 2022 23:26:14 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: Corentin Labbe <clabbe@...libre.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH] crypto: amlogic - Save a few bytes of memory
Le 22/11/2022 à 23:02, Martin Blumenstingl a écrit :
> On Tue, Nov 22, 2022 at 10:57 PM Christophe JAILLET
> <christophe.jaillet@...adoo.fr> wrote:
>>
>> There is no real point in allocating dedicated memory for the irqs array.
>> MAXFLOW is only 2, so it is easier to allocated the needed space
>> directly within the 'meson_dev' structure.
>>
>> This saves some memory allocation and avoids an indirection when using the
>> irqs array.
> ..and it even fixes a missing devm_kcalloc error check
>
> Personally I prefer this approach over a patch that was sent earlier today: [0]
Funny.
A file untouched for about 18 months and 2 patches around the same line,
... the same day!
> Corentin, Christophe, what do you think?
Obviously, mine is better :)
More seriously, I think it is mostly a mater of taste and that both are
fine. Neither one will make a real difference IRL.
I guess that memory allocation failure in probe are unlikely and saving
64 bytes (40 for devm_ + 2 x 4 = 48, rounded to 64 bytes) won't make any
real difference.
Up to you.
CJ
>
>
> Best regards,
> Martin
>
>
> [0] https://lore.kernel.org/linux-crypto/0df30bbf-3b7e-ed20-e316-41192bf3cc2b@linaro.org/T/#m6a45b44206c282f106d379b01d19027823c5d79b
>
Powered by blists - more mailing lists