Re: [PATCH v5 4/6] initramfs: Refactor to use hex2bin() instead of custom approach

From: Petr Mladek

Date: Wed Apr 01 2026 - 09:05:21 EST


On Tue 2026-03-31 17:57:34, David Disseldorp wrote:
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> There is a simple_strntoul() function used solely as a shortcut
> for hex2bin() with proper endianess conversions. Replace that
> and drop the unneeded function in the next changes.
>
> This implementation will abort if we fail to parse the cpio header,
> instead of using potentially bogus header values.
>
> Co-developed-by: David Disseldorp <ddiss@xxxxxxx>
> Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr