Re: [PATCH v5 iwl-next] i40e: Use correct buffer size in i40e_dbg_command_read

From: Alexander Lobakin
Date: Fri Dec 08 2023 - 10:02:08 EST


From: Kunwu Chan <chentao@xxxxxxxxxx>
Date: Fri, 8 Dec 2023 11:19:50 +0800

> The size of "i40e_dbg_command_buf" is 256, the size of "name"
> depends on "IFNAMSIZ", plus a null character and format size,
> the total size is more than 256.
>
> Improve readability and maintainability by replacing a hardcoded string
> allocation and formatting by the use of the kasprintf() helper.
>
> Fixes: 02e9c290814c ("i40e: debugfs interface")
> Suggested-by: Simon Horman <horms@xxxxxxxxxx>
> Suggested-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> Suggested-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
> Cc: Kunwu Chan <kunwu.chan@xxxxxxxxxxx>
> Signed-off-by: Kunwu Chan <chentao@xxxxxxxxxx>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>

Thanks,
Olek