Re: [PATCH net-next v5 1/4] net: devlink: let the core report the driver name instead of the drivers

From: Jiri Pirko
Date: Tue Nov 29 2022 - 03:25:10 EST


Tue, Nov 29, 2022 at 01:05:47AM CET, mailhol.vincent@xxxxxxxxxx wrote:
>The driver name is available in device_driver::name. Right now,
>drivers still have to report this piece of information themselves in
>their devlink_ops::info_get callback function.
>
>In order to factorize code, make devlink_nl_info_fill() add the driver
>name attribute.
>
>nla_put() does not check if an attribute already exists and
>unconditionally reserves new space [1]. To avoid attribute
>duplication, clean-up all the drivers which are currently reporting
>the driver name in their callback.

This para with the link below should be removed, no need for it.

Otherwise, code looks fine.

Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>