[PATCH V2 4/5] nvmem: u-boot-env: improve coding style
Miquel Raynal
miquel.raynal at bootlin.com
Tue Dec 19 23:19:24 PST 2023
Hi Rafał,
zajec5 at gmail.com wrote on Tue, 19 Dec 2023 18:40:24 +0100:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> 1. Prefer kzalloc() over kcalloc()
> See memory-allocation.rst which says: "to be on the safe side it's
> best to use routines that set memory to zero, like kzalloc()"
> 2. Drop dev_err() for u_boot_env_add_cells() fail
> It can fail only on -ENOMEM. We don't want to print error then.
> 3. Add extra "crc32_addr" variable
> It makes code reading header's crc32 easier to understand / review.
>
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
Looks much nicer :)
Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
Thanks,
Miquèl
More information about the linux-mtd
mailing list