Re: [PATCH 5.15 128/570] octeontx2-af: devlink health: use retained error fmsg API

Harshit Mogalapalli
2026-04-14T15:36:27Z

Hi,

On 13/04/26 21:24, Greg Kroah-Hartman wrote:
> 5.15-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>
> [ Upstream commit d8cf03fca3411de8a493dae5e9fcf815a4f0977e ]
>
> Drop unneeded error checking.
>
> devlink_fmsg_*() family of functions is now retaining errors,
> so there is no need to check for them after each call.
>

I have run an AI assisted backport review and it spotted an issue: I
have taken a look and the issues goes like:

commit: db80d3b2558f ("devlink: retain error in struct devlink_fmsg") is
not present in 5.15.y, so backporting this patch which assumes the
presence of the commit referenced looks wrong.

Upstream(v6.7+) has something like:

struct devlink_fmsg {
struct list_head item_list;
int err; /* first error encountered on some devlink_fmsg_XXX() call */
bool putting_binary;
};

if (fmsg->err)
return fmsg->err;
...
fmsg->err = -ENOMEM;
return fmsg->err;

5.15.y has something like:

struct devlink_fmsg {
struct list_head item_list;
bool putting_binary;
};

err = devlink_fmsg_nest_common(fmsg, DEVLINK_ATTR_FMSG_PAIR_NEST_START);
if (err)
return err;
...
return 0;

So it looks like we shouldn't be backporting this without the commit:
db80d3b2558f ("devlink: retain error in struct devlink_fmsg") in 5.15.y

Thanks,
Harshit

> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Stable-dep-of: 87f7dff3ec75 ("octeontx2-af: devlink: fix NIX RAS reporter to use RAS interrupt status")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> .../marvell/octeontx2/af/rvu_devlink.c | 464 +++++-------------
> 1 file changed, 133 insertions(+), 331 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> index c3da400e87eba..8a63277aab1af 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> @@ -13,26 +13,16 @@
>
> #define DRV_NAME "octeontx2-af"
>
> -static int rvu_report_pair_start(struct devlink_fmsg *fmsg, const char *name)
> +static void rvu_report_pair_start(struct devlink_fmsg *fmsg, const char *name)
> {
> - int err;
> -
> - err = devlink_fmsg_pair_nest_start(fmsg, name);
> - if (err)
> - return err;
> -
> - return devlink_fmsg_obj_nest_start(fmsg);
> + devlink_fmsg_pair_nest_start(fmsg, name);
> + devlink_fmsg_obj_nest_start(fmsg);
> }
>
> -static int rvu_report_pair_end(struct devlink_fmsg *fmsg)
> +static void rvu_report_pair_end(struct devlink_fmsg *fmsg)
> {
> - int err;
> -
> - err = devlink_fmsg_obj_nest_end(fmsg);
> - if (err)
> - return err;
> -
> - return devlink_fmsg_pair_nest_end(fmsg);
> + devlink_fmsg_obj_nest_end(fmsg);
> + devlink_fmsg_pair_nest_end(fmsg);
> }
>
> stati