Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1772112rda; Tue, 24 Oct 2023 02:51:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+fhMATbGvAMuW/XUUKEbQBiPlYGpRSmA5Hk0OipFq8OlmpJN2TK6qwFqwmf+O7T0RR3i4 X-Received: by 2002:a17:902:fb03:b0:1b8:8682:62fb with SMTP id le3-20020a170902fb0300b001b8868262fbmr16883543plb.4.1698141118459; Tue, 24 Oct 2023 02:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698141118; cv=none; d=google.com; s=arc-20160816; b=eXkEvZb73BobB9NYfs27kRiy3Tuz1hU2Ja2+fnFie2CyDuVqj33PC7EdNKY7x4OdgJ 72UeNSLs08A26b6YjGlUxcrl3uS42hcdfX+ZDbhunPg9xmLXAxkDpaQGF5qS10Y+9D3t 79JH7rHJxs40xfkUN0pqhM5LHOwz33jfn5exjJHin/jv44RkX9BJQThVRF5zAI379ZrQ ADHdYFoNGrpseoOLd8Ib3gsJKL0eqYbkp5mw5AKyTKPg7ykuDWvfJfEieRFrNR27ICb7 aFJiT9QuOIuvcd2P8Jlj9d0jzcvb8GX7Sq/sXUvNtcUkiKEqBAanE3KUYls2Q3tmtkaM w6AA== 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=Dlhk8Z4MNGAJNlAwZKSD8+Gfu1Hv7jMp2quDDwwtBiw=; fh=WjwkSAUoCunHUu7VDdVcC6vFDeFBw/cMY0qeW/zTfHk=; b=Tv9xhdw46Wk3QVFZBZ8YiPeDb4U3xzKFMddyUJr1zrDLniob3bKdLyU9aqkC2cSEZN LjdP1pfOxPiGofKWmBny3z9dvlkLDYH1zHPZc49JSEIJeLpXDQlyQ5bQX+sbzasrTpEa iInEx/9d+Sr2KvrjccAi+xALlGFhS2dAUUejfQ/Lko9mKl//eymKQ/ZoOHbmS45qhwB5 gpyVbLf8wYH3SdqglpwF3bnmUigCd+/UekFn446Bm2ZxiQasDpQ20cVLAi5a8BPMRVbl Y3jtfzkXVZIqAd6Oz4narF+AUX0SCfRWFtFARjS0d5SuPvGSOny+9ZqXs/G0aVgArmdz ngoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QWmAcWMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 28-20020a63125c000000b0055fce913d52si7837503pgs.761.2023.10.24.02.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QWmAcWMh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3A32580423A8; Tue, 24 Oct 2023 02:51:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233953AbjJXJvu (ORCPT + 99 others); Tue, 24 Oct 2023 05:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232119AbjJXJvc (ORCPT ); Tue, 24 Oct 2023 05:51:32 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 553B810C2 for ; Tue, 24 Oct 2023 02:51:30 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4084f682d31so31488195e9.2 for ; Tue, 24 Oct 2023 02:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698141089; x=1698745889; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Dlhk8Z4MNGAJNlAwZKSD8+Gfu1Hv7jMp2quDDwwtBiw=; b=QWmAcWMh7lyB1SpYJcoXvFp2ArSXQZm2+sPI/ZE6sadQyBBkUCVGBgeEiivbVQzCZ8 bpNwNrON6rJKI7kpwD3ZhhE7/+wnO7yDo1DbJaZK4VpBqbP1DpYrd9V3FqaX+C3foA8U kTccY4Saos/+LnSgoK1tFk4nbki1//QPaDkIBWi12ccMG+YlwvHCnAGlPQquFe6dNXSw ZnOmE1h8bDFsLWLBj0PaWzABy9zFwN2JssZTPIuwrlrh2HIoh8F1cuEgPs/ePTbtfu5Z Cq3Sc931mVwPlgA8fjRnKd5m91PLVF0LUuwB05AYCQhfDjx3nQswh3thQkybqVZWqTpG qgow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698141089; x=1698745889; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dlhk8Z4MNGAJNlAwZKSD8+Gfu1Hv7jMp2quDDwwtBiw=; b=O4gLmKsd60KK2A2Tt+bCTajVDETw2v3ezk4ghgtRSkLTNG5Ojg1s7FsQm4Uio+f1FF SSfTj4O/tJzNaeXANO7x+ZOxW6RYrd3hzCkrTXUknJ2FtNEG9lH5NJ9u5Gm6s9/f3TH2 Zdt/7wkJLIwDHJ/FxhNC7FnoOAnIfvo+f+0MgrNzYzOOXHxSXGQgqKUGdXzCJFka4psi 6x9uh/CA+nMvEt/3Z3WwzchPxcfRNmoE3S9Js+eyCdKhHR88WVLTOpyTSIka5x7pr+Ce +ib6iSezloLnyjq/+7dYWKZW+SZP3+FmIgP4/KKlLQneC4IC9twALg4Mxi1DP4DaZz87 GRsQ== X-Gm-Message-State: AOJu0YwBGAQAfaK1u1YdCz6Pl65oyNfuAlObMWucIfur+WahmQc0ffTZ HOoR5eoMMPONt+ZZGj9Nh3r94Q== X-Received: by 2002:adf:e34f:0:b0:32d:a781:111 with SMTP id n15-20020adfe34f000000b0032da7810111mr8671201wrj.15.1698141088754; Tue, 24 Oct 2023 02:51:28 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id x18-20020a5d60d2000000b003248a490e3asm9544652wrt.39.2023.10.24.02.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:51:28 -0700 (PDT) Date: Tue, 24 Oct 2023 12:50:59 +0300 From: Dan Carpenter 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 , Simon Horman , 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, Benjamin Poirier , Jesse Brandeburg , Jiri Pirko Subject: Re: [PATCH net-next v3 08/11] net/mlx5: devlink health: use retained error fmsg API Message-ID: <8bd30131-c9f2-4075-a575-7fa2793a1760@moroto.mountain> References: <20231018202647.44769-1-przemyslaw.kitszel@intel.com> <20231018202647.44769-9-przemyslaw.kitszel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018202647.44769-9-przemyslaw.kitszel@intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 02:51:56 -0700 (PDT) On Wed, Oct 18, 2023 at 10:26:44PM +0200, Przemek Kitszel wrote: > if (rq->icosq) { > struct mlx5e_icosq *icosq = rq->icosq; > u8 icosq_hw_state; > > - err = mlx5_core_query_sq_state(rq->mdev, icosq->sqn, &icosq_hw_state); > - if (err) > - return err; > - > - err = mlx5e_reporter_icosq_diagnose(icosq, icosq_hw_state, fmsg); > - if (err) > - return err; > + mlx5_core_query_sq_state(rq->mdev, icosq->sqn, &icosq_hw_state); When we remove the error checking then Smatch correctly complains that icosq_hw_state is used uninitialized. drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:268 mlx5e_rx_reporter_build_diagnose_output_rq_common() error: uninitialized symbol 'icosq_hw_state'. > + mlx5e_reporter_icosq_diagnose(icosq, icosq_hw_state, fmsg); > } > > return 0; > } See also: drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:229 mlx5e_tx_reporter_build_diagnose_output_sq_common() error: uninitialized symbol 'state'. regards, dan carpenter