Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1896506rda; Tue, 24 Oct 2023 06:44:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRHVKOSZJYV8J3ChbCixfJ3MyM/7J/DYSACZTj1r2veP1Cs8Gkehfr3D0qtQ7ro+tYSG/z X-Received: by 2002:a17:902:ec85:b0:1ca:7909:6ed4 with SMTP id x5-20020a170902ec8500b001ca79096ed4mr20728505plg.5.1698155045550; Tue, 24 Oct 2023 06:44:05 -0700 (PDT) Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l9-20020a170902f68900b001bb0ff2b354si8557342plg.425.2023.10.24.06.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:44:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UwecES12; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 10EFB80A49BB; Tue, 24 Oct 2023 06:44:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234404AbjJXNnp (ORCPT + 99 others); Tue, 24 Oct 2023 09:43:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233153AbjJXNnn (ORCPT ); Tue, 24 Oct 2023 09:43:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F7C793; Tue, 24 Oct 2023 06:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698155021; x=1729691021; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=KRo+2AD2u8nWJgx+4MOYr+5TEkrKOatN/EKo2KUhHRE=; b=UwecES12rPk5MdcsmWM+ihtLUQ96vNPVEx1uZCmJDaxw8+iDlCT1GfHF eUkiEK9Ngw5iE/SMVlxpCKp6IamDSeEmArIMpYtwoE+I3gIqxPqLZekMN GlAPRcZr6kKXFQ4A22DEV07Lco3NkNApFlIv6b8t54Qca0vS+bM2Tpkrl qnxG0x333PeG4/75Gfh9WLx6aBtzLBaFvpEULBWIzb9XuGvGZVTPVdvvm 1L9e7RvyPjEb2WY0sj1QaoHgQXSablOJMhDbZCn98jGn7OeixiBOAmKwI bhrN6bltylP4bYS0/313Q9pVfjn6d4zySOqFzgFrMTaoPWHaLzZvOOt1k Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="366401150" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="366401150" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 06:43:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="793489938" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="793489938" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Oct 2023 06:43:40 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 24 Oct 2023 06:43:39 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 24 Oct 2023 06:43:39 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 24 Oct 2023 06:43:39 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 24 Oct 2023 06:43:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzWgaQDhceb0n3pa39YEMEWvLUdiBbEiDO/cW11tx/0Sg9RhGW30YBL9zLPnt5wJOITaMRNA9uY865Egxbly1oteRaXloyfPGd6vT8qNAJtdYaXjGrI2poqVU5jUTauDRePoWA2neI1JggY2Ulr/ckIj/no1ZA7HkoIvxjWQ4W3Z9PbqTMPpDD6kfIVwMrrgMFtWGgPbsuHOYGCtH0V0RK5PyfokzEyrLEbHK6h8FUcLbiOdA3LyAuiLZRpIBx3Ijk531f0q7COxYDPs+SlRn6izR0L10jpb1ihVBENrESgak+KiY+APqzZ44y7t0kr9lHJI59xNPIvrWK8MFONK7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KnYCz7BdskmPAla5Cf8eHHDfGqdq7ic1l9J6lUA2nyc=; b=GIfCnorEuQktw2llfgkiJXbNuuyAwNPwmy3zGiRIZlC51qakbxH4wXe7kR0tonHQBHtOS0wD00MTNyF6iHbNmQtzYkPJ9p/JAF8NREFehq36xjNVkvee//njdfxwuyh4tQ36wk9OzycGN1gVJzaFnQIjgCRT8zudMm4cv7BojZRSWpQeITxazmU+K4Et56P6DA27PtILKrORw4xm9ntUJQCQ0bUXYOYIbR9hm1Fgim6EghUdWu62nZzRRn86C9pvLT+4kn8WVwFWluBj1V5h67Ys/ccwvScgvjQOSmz87cKcZ57EQWDEb/M0jofvJ+pZH2Dv6BGqXSROoTNxuwLqYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3672.namprd11.prod.outlook.com (2603:10b6:a03:fa::30) by DS0PR11MB7803.namprd11.prod.outlook.com (2603:10b6:8:f5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Tue, 24 Oct 2023 13:43:35 +0000 Received: from BYAPR11MB3672.namprd11.prod.outlook.com ([fe80::7666:c666:e6b6:6e48]) by BYAPR11MB3672.namprd11.prod.outlook.com ([fe80::7666:c666:e6b6:6e48%4]) with mapi id 15.20.6907.021; Tue, 24 Oct 2023 13:43:34 +0000 Message-ID: Date: Tue, 24 Oct 2023 15:43:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH net-next v3 08/11] net/mlx5: devlink health: use retained error fmsg API Content-Language: en-US To: Dan Carpenter CC: Jiri Pirko , , "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 , , Jesse Brandeburg , Jiri Pirko References: <20231018202647.44769-1-przemyslaw.kitszel@intel.com> <20231018202647.44769-9-przemyslaw.kitszel@intel.com> <8bd30131-c9f2-4075-a575-7fa2793a1760@moroto.mountain> From: Przemek Kitszel In-Reply-To: <8bd30131-c9f2-4075-a575-7fa2793a1760@moroto.mountain> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0284.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:e6::8) To BYAPR11MB3672.namprd11.prod.outlook.com (2603:10b6:a03:fa::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB3672:EE_|DS0PR11MB7803:EE_ X-MS-Office365-Filtering-Correlation-Id: 74c20840-2cd7-4626-7d53-08dbd49737b6 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5dcwgQ1mr6RHRcSUjfp4NwKWrK+HsVcLH14IJz/Mag90N0Ptbs81KcJJV7vGP2CNrSBHGXrUy3L4kOAOjgYLQpXl1Vh+sWgyOfczd1hFq8FpIpPAriMCqHD7iyYVFJ1VR3b+29ZSIZxm8q9o5n97D8+slDzuoy34tGAd9Y7kx79Px7ScgXnUQVEv2134LCWhwAyYTJK1LGfu9aiep+lOOQgFpAqty6rme5CaQM2G2isEvljVLD0FK4mJO/sfMeTwCvuZroOtY48Pw/aBY0wt6A+P8mDzD27Wq9Lc8X1W7HcBxF6SzgpurC40oAN2pshWoNVNV1j8ij0O8sFwm2ti/F2JQXHsg5+WMGfInN8mQiz/KsGCRxhecMS6L26hNV3Ne/Ou5hI6k5I5aGRrhJSzEah3Tg2b8S1b2kmbElUy9dmaHLxxcIzuSAijBHFbJEw3/jiUnpidP+t6lkSHFDBS/41VpCB6zZ6rPPzNB0upD8z6vrY1E6LrYl/FeZehAtVDWGKF8SHCc6eZKujFuf7zLdMHD9iLbKfVxsYUZsgJxnpWQGj0LJjDM3hXvsfPF3HucQqJF7OSSUYUiVy915y02kfH72Ybqb3UitaIKXixfF4hqvN9lTv606ESUf5ia+PovBE1Rw62lEtXt9gZjgKjQg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3672.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(39860400002)(376002)(366004)(396003)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(26005)(31686004)(38100700002)(2906002)(86362001)(31696002)(36756003)(7406005)(7416002)(5660300002)(4326008)(8936002)(8676002)(478600001)(6506007)(2616005)(66476007)(41300700001)(54906003)(6666004)(6916009)(66556008)(66946007)(316002)(82960400001)(6486002)(6512007)(53546011)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TlJaZWt4QnFXN1NmRzNlRmNFVkpPZGlmZUgvcE1ienJKb2ZNdXgxeHFQMTE2?= =?utf-8?B?MzZlbklEcmVVMHdSbHFuTzJ6Y0FNVVhVb0llb2thdHRsWk85cmZFeE9UaWg4?= =?utf-8?B?eW9tdzJHUE0yMnhRLzNFdEJOSm51azl0ZW5XeHZJK0xRUDkvaHlHeEZENFlm?= =?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RZWmg3bHgydFJ4MDZxMzBUWWFoUkkzR05KbDRL?= =?utf-8?B?WXF1c2twa2EzdFVqK3BEZ0hwblFkcjBiQUFuNVdZWUo5Rit4NEtHQlJZQlRW?= =?utf-8?B?NStrMi9oanZMOVJlNDNJYlVOM3NCVnowemlwT1BQVzRTVmZrSnNCYnExMnlR?= =?utf-8?B?N0d3TGgzbjc1LzAvb0srTE9vS2o5M1JmTG8zRUtEQ1p2dUhtV2hBc0Z3MldB?= =?utf-8?B?ZWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 74c20840-2cd7-4626-7d53-08dbd49737b6 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3672.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 13:43:34.6555 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Fz8L9JuBZg23AThlMDrRc2Y5PR+j+3uGxDD6SJQHYRJ2V+RkWMJ/ehAmFuxqxDCTtouELlqoIkM5Smtm+hG4z97Dudki6JutSIemyd5u7rU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7803 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 24 Oct 2023 06:44:03 -0700 (PDT) On 10/24/23 11:50, Dan Carpenter wrote: > 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 thank you for the report, I will post a fix soon