netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shannon Nelson <shannon.nelson@amd.com>,
	Michael Chan <michael.chan@broadcom.com>,
	Cai Huoqing <cai.huoqing@linux.dev>,
	George Cherian <george.cherian@marvell.com>,
	Danielle Ratson <danieller@nvidia.com>,
	Moshe Shemesh <moshe@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Ariel Elior <aelior@marvell.com>,
	Manish Chopra <manishc@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>,
	Coiby Xu <coiby.xu@gmail.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Sunil Goutham <sgoutham@marvell.com>,
	Linu Cherian <lcherian@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>, hariprasad <hkelam@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
	Eran Ben Elisha <eranbe@nvidia.com>,
	Aya Levin <ayal@mellanox.com>, Leon Romanovsky <leon@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 11/11] devlink: convert most of devlink_fmsg_*() to return void
Date: Wed, 18 Oct 2023 18:10:55 +0200	[thread overview]
Message-ID: <20231018161055.GU1940501@kernel.org> (raw)
In-Reply-To: <20231017105341.415466-12-przemyslaw.kitszel@intel.com>

On Tue, Oct 17, 2023 at 12:53:41PM +0200, Przemek Kitszel wrote:

...

> diff --git a/net/devlink/health.c b/net/devlink/health.c
> index 3858a436598e..f4a6de576b6c 100644
> --- a/net/devlink/health.c
> +++ b/net/devlink/health.c
> @@ -566,17 +566,15 @@ static int devlink_health_do_dump(struct devlink_health_reporter *reporter,
>  	if (!reporter->dump_fmsg)
>  		return -ENOMEM;
>  
> -	err = devlink_fmsg_obj_nest_start(reporter->dump_fmsg);
> -	if (err)
> -		goto dump_err;
> +	devlink_fmsg_obj_nest_start(reporter->dump_fmsg);
>  
>  	err = reporter->ops->dump(reporter, reporter->dump_fmsg,
>  				  priv_ctx, extack);
>  	if (err)
>  		goto dump_err;
>  
> -	err = devlink_fmsg_obj_nest_end(reporter->dump_fmsg);
> -	if (err)
> +	devlink_fmsg_obj_nest_end(reporter->dump_fmsg);
> +	if (reporter->dump_fmsg->err)

Hi Przemek,

Smatch warns that err is not set to an error value here.

>  		goto dump_err;
>  
>  	reporter->dump_ts = jiffies;

...

  reply	other threads:[~2023-10-18 16:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 10:53 [PATCH net-next v2 00/11] devlink: retain error in struct devlink_fmsg Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 01/11] " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 02/11] netdevsim: devlink health: use retained error fmsg API Przemek Kitszel
2023-10-18  1:20   ` Jakub Kicinski
2023-10-17 10:53 ` [PATCH net-next v2 03/11] pds_core: " Przemek Kitszel
2023-10-17 11:06   ` Jiri Pirko
2023-10-17 11:15     ` Jiri Pirko
2023-10-17 11:35       ` Przemek Kitszel
2023-10-17 16:52   ` Nelson, Shannon
2023-10-17 10:53 ` [PATCH net-next v2 04/11] bnxt_en: " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 05/11] hinic: " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 06/11] octeontx2-af: " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 07/11] mlxsw: core: " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 08/11] net/mlx5: " Przemek Kitszel
2023-10-18 16:08   ` Simon Horman
2023-10-17 10:53 ` [PATCH net-next v2 09/11] qed: " Przemek Kitszel
2023-10-17 10:53 ` [PATCH net-next v2 10/11] staging: qlge: " Przemek Kitszel
2023-10-18  1:15   ` Jakub Kicinski
2023-10-19 14:28     ` Benjamin Poirier
2023-10-19 14:42       ` Jakub Kicinski
2023-10-19 18:32         ` Benjamin Poirier
2023-10-17 10:53 ` [PATCH net-next v2 11/11] devlink: convert most of devlink_fmsg_*() to return void Przemek Kitszel
2023-10-18 16:10   ` Simon Horman [this message]
2023-10-17 11:17 ` [PATCH net-next v2 00/11] devlink: retain error in struct devlink_fmsg Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231018161055.GU1940501@kernel.org \
    --to=horms@kernel.org \
    --cc=aelior@marvell.com \
    --cc=ayal@mellanox.com \
    --cc=brett.creeley@amd.com \
    --cc=cai.huoqing@linux.dev \
    --cc=coiby.xu@gmail.com \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eranbe@nvidia.com \
    --cc=gakula@marvell.com \
    --cc=george.cherian@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=idosch@nvidia.com \
    --cc=irusskikh@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=michael.chan@broadcom.com \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=saeedm@nvidia.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=shannon.nelson@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).