Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3904467rdg; Wed, 18 Oct 2023 09:09:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcSEN/y6oo3PzvyZUGztGFhpeqjbh5fSN+g0KycIEVg7EIwNPUwswgydGCv2wQKHlP9TA+ X-Received: by 2002:a05:6a20:da8c:b0:17a:fa76:8062 with SMTP id iy12-20020a056a20da8c00b0017afa768062mr5942065pzb.19.1697645378709; Wed, 18 Oct 2023 09:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697645378; cv=none; d=google.com; s=arc-20160816; b=iLWyOgiLNMgUb+M4Xj7ArUXsA5d7+TU02iAHNblbgKoFWBrfIzDBMWdNq1GeV+y1do xckKLcWb7VEtjkNz+vzWeAaDdqaasnzAjBrPqGEjXnMSIAsR3RBGF5xtXca6WmSDt+nS foFs1S7XOpLLWubWqCkbIBixLM8esZuUY4O5KnX2ceWTFBRoRsMh7vSf16pEG8XczR3V l+4PuaZsLMr+yXFiJxPJKUCYyuADprfSmbK9S1+7LGQ8OaWQ9HUIBmUonmNwCl3DA5dH uABSaS1S/24XRmxGe7AIsT7TTZWM74SjdBsq0U6a9yXKLNkNZbxrHHfDP5zxjHMxkRl5 9fZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=siB8JWC2w+eRgZ0NVet010oEEbFb+voVRzv9xrQhYbE=; fh=wsziotkS296obYL2+Mpigd9zM1i8NFTed3NjOISWIe8=; b=TfOzRHfF7QhTn/iqvjwpwOFhooQfq74Jo/G7GpZjUFd2Hj+ZIRX2cKl65P7Wob9b9l Kwz7JN/jHZKJHCzJwbi7GTaqDtwGX8DwIkh1nC4vp8ZaoFbyLHzyTCXURHqLHfnRXOFJ LfSxpKgDUMu7OpHCnq2SbJjJyKbtUUt/3oTfPVNnGjrEOjTPvDR5yS58BJekZK6LoY6Q dyNeJgqMSqUtkxWX7wKwbUGBdbiceMqpufVtBlb5vRoW+h8mMwZ/OFJfOiJYrM052CP1 nmPXNOQFpqfDqB0UqliNd1J0c6MvMoz1bzDmmXf9BZIv/8+5oQt4HQgBhDQLhGrx4XMb dBWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xu0yRV8x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bn20-20020a056a02031400b00578d0d070f4si2429252pgb.844.2023.10.18.09.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:09:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xu0yRV8x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5E727822B8D3; Wed, 18 Oct 2023 09:09:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344761AbjJRQJZ (ORCPT + 99 others); Wed, 18 Oct 2023 12:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235267AbjJRQJH (ORCPT ); Wed, 18 Oct 2023 12:09:07 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2D6D12A for ; Wed, 18 Oct 2023 09:09:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12435C433C7; Wed, 18 Oct 2023 16:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645342; bh=4MR7iDZ+ixMX3Hkqy8fTKzN7HrpxuhyU6baJRTI8kUg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xu0yRV8xDJ2jramzFaTKjJu286TbqXgRtm6Fnu6t/XIWQN67j4ZKJzisW2q9Xc+43 aJP9Clv7ivguDYTQHxjOOg/UJX5LkCg35QqWSOk1mRuBGg4Ce8MxOKRICXSTUxQrFD Z40rGO35IXupws5F9Y5gw5++KTerH/+BA213yF1MxOmm8HnglybT/1Mp2CJQeC2Ox6 /K6wEwD7y/RXAUVJvasd/7I7i5569LnWUiB7OBB9nj2O8wtl16qcrf6WQnu7LHd/8r KCUYy6pEUiOMQx3fr0Dj+JxVLpZsI9C8CU2Ai/yYzsrCpleBTM3FBS+0Kf8RtHn68Q +JZA55NQnJxww== Date: Wed, 18 Oct 2023 18:08:55 +0200 From: Simon Horman To: Przemek Kitszel Cc: Jiri Pirko , netdev@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shannon Nelson , Michael Chan , Cai Huoqing , George Cherian , Danielle Ratson , Moshe Shemesh , Saeed Mahameed , Ariel Elior , Manish Chopra , Igor Russkikh , Coiby Xu , Brett Creeley , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Ido Schimmel , Petr Machata , Eran Ben Elisha , Aya Levin , Leon Romanovsky , linux-kernel@vger.kernel.org, Jesse Brandeburg Subject: Re: [PATCH net-next v2 08/11] net/mlx5: devlink health: use retained error fmsg API Message-ID: <20231018160855.GT1940501@kernel.org> References: <20231017105341.415466-1-przemyslaw.kitszel@intel.com> <20231017105341.415466-9-przemyslaw.kitszel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231017105341.415466-9-przemyslaw.kitszel@intel.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 09:09:36 -0700 (PDT) On Tue, Oct 17, 2023 at 12:53:38PM +0200, Przemek Kitszel wrote: > 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. > > Reviewed-by: Jesse Brandeburg > Signed-off-by: Przemek Kitszel ... > @@ -288,52 +206,31 @@ int mlx5e_health_rsc_fmsg_dump(struct mlx5e_priv *priv, struct mlx5_rsc_key *key Hi Przemek, The code above this hunk looks like this: do { cmd_err = mlx5_rsc_dump_next(mdev, cmd, page, &size); if (cmd_err < 0) { err = cmd_err; clang-16 W=1 warns that err, which is used as the return value of the function, will be uninitialised if the loop never hits this condition. Smatch also warns about this. > goto destroy_cmd; > } > > - err = mlx5e_health_rsc_fmsg_binary(fmsg, page_address(page), size); > - if (err) > - goto destroy_cmd; > - > + mlx5e_health_rsc_fmsg_binary(fmsg, page_address(page), size); > } while (cmd_err > 0); > > destroy_cmd: > mlx5_rsc_dump_cmd_destroy(cmd); > - end_err = devlink_fmsg_binary_pair_nest_end(fmsg); > - if (end_err) > - err = end_err; > + devlink_fmsg_binary_pair_nest_end(fmsg); > free_page: > __free_page(page); > return err; > } ...