Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7025191rwr; Tue, 2 May 2023 08:30:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CYkbLo9DWSV1LbGj4otR2FTVqqaqiVQu8VeonHuhC7to02wdXH8Ie3ov32TZrbnU/1tyh X-Received: by 2002:a05:6a20:1592:b0:f6:592a:7e28 with SMTP id h18-20020a056a20159200b000f6592a7e28mr22492869pzj.14.1683041456907; Tue, 02 May 2023 08:30:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683041456; cv=pass; d=google.com; s=arc-20160816; b=zsKCDYWQq5My3hzFUyHI/gsvv3NFncm5UqSnCiNp+GB3TEUBeu4FbxEnSElYdeSyt3 pu8rw3UZoBIb3KlCZPDEFBGQbB8DZXQFHl0mDzaerYwDfwU/kWctzMkhMwUecHxGYfed BQvUCzHiFGZqv40+XybyJs4jynA+L00a/feO7pNhchof18BV0LHngnBxzvODof/nIxQs jM1BqvduwS7qiqQXqzkYvyMioWikqJqjvSTyDpkf1JOCLT5kKAVUh2OdiJvPZET1/CdW lNuNt6Fs4rDOBHzniEYx2f5Rd8x5BYC9cQRtm2524VcRLTOnnFLGEHLkw9XOZNS45bE2 Xq7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iKSSL1MuqPlVL7uJ+UaFiY9t6QrKipil9fXXzsd7Lx8=; b=vCRh2JAMf5MRRSV3sFPFusprbuurLIcDyOaEZMizC9pRPGQDR4rXis0OwtFE45RC8d ZLtaoQxG/+Ae2WJYQyi49vDI+OXp2zoc2REYGTfQCSxQeNCwuOGWcG4F3tPdJQbNcnbf 5dAIA7cQHccd/TE4hSNaedIBaw5JP91Wf/J4e7pUP0QWpz1V9ibZr94HxuvrHwDmEC4j mhB+WRuhA7u2MWIg8GguJriqB+8AvLlM94tiX1Jj3RfBYOk2vNODAk4dEjMCka19pMYH qROQH9XsuzwE0nWZ/bS3GB7x3L1sjz5pO0WvZlf+0+Y/y+gd67gJfiNDLfdp85ZBVQxl 8lxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=dBvXzU3c; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a63c154000000b0050300b179f3si30138531pgi.444.2023.05.02.08.30.42; Tue, 02 May 2023 08:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=dBvXzU3c; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234131AbjEBP0w (ORCPT + 99 others); Tue, 2 May 2023 11:26:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbjEBP0v (ORCPT ); Tue, 2 May 2023 11:26:51 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2101.outbound.protection.outlook.com [40.107.244.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AAB830EB; Tue, 2 May 2023 08:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f1vfo9Enbpioq4NfC35nw0ObYesHy9OU0o6YTtiqQXcgTd/VPHbM0dCER5umNQF1WyPMMFnuc98s8HSXC4YZMD1gyVh8dOepprNUqv8zT0MlzqD8ArVz1jQ4IHfslKzqxinGDwkWhBUfZGB1zXqZFM/iijW1odZ6oDa4s+RnEeBbriIQ5YnuD4IotdPJinHcTZ45ACs584T1Z4dqzLtX/eAsQ6yxuQ4/JAM+YC4+g9wkA3Q/idbapHypAikzth/LymFBi/LtdKc9O78FbX/dTKG/Wi8yZO0i28eoki1LBVoQnsj6WVOCKtMzDb7UiF5pPV8E2Ug596cC5GfcXcIIOg== 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=iKSSL1MuqPlVL7uJ+UaFiY9t6QrKipil9fXXzsd7Lx8=; b=UgNKyDVY9Q5ChaQYTtkUbrlXW9KyBndROWXqJGnKOzZauRGVPmembk6JtkPVMUFGZfCU5vOMYCG8teAJz9v6Zi9YbWcUIvxevP7sxPSNakgEdH321LzL2BIa+GgO6/3mOMpDoSpEJEWi/Fcqs+dBNW0kKJY0+Bv8gJKwPw9Tl2PGWsAnOwvOkVM/pKGKH+Uc1r35emqIzlVkYF/xj8aRTfXC2vNo7NAExVhOTQdGyFCvui5bu10VP4KpFoCKZNRgHQY5/nFUbo4C0hX9TIwPHyOhRwkZ+dLV2sID3ldSNWjQW1a8f2vSEn9tCKIHCTRqn34TnL9wcGJ2ar+XGobACQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iKSSL1MuqPlVL7uJ+UaFiY9t6QrKipil9fXXzsd7Lx8=; b=dBvXzU3cXs/2GC78x4R5+wvggDOvkydDE/ERETfynBrWEj0EbFs7tTfJXHTTt+P3LwvOuTZeLTbxeQxTIhwhjP+2sAxFY5aU+0G2iAIQvekv4PKlKGwlbrRp5QGY+T2cLrwxjDXbqBzMoq/w9LLau6hTe+xdcDh6M+wHrrWKbFM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SN4PR13MB5812.namprd13.prod.outlook.com (2603:10b6:806:21c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20; Tue, 2 May 2023 15:26:38 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34%5]) with mapi id 15.20.6340.031; Tue, 2 May 2023 15:26:38 +0000 Date: Tue, 2 May 2023 17:26:30 +0200 From: Simon Horman To: Dominique Martinet Cc: Eric Van Hensbergen , Latchesar Ionkov , Christian Schoenebeck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 5/5] 9p: remove dead stores (variable set again without being read) Message-ID: References: <20230427-scan-build-v1-0-efa05d65e2da@codewreck.org> <20230427-scan-build-v1-5-efa05d65e2da@codewreck.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230427-scan-build-v1-5-efa05d65e2da@codewreck.org> X-ClientProxiedBy: AM8P251CA0001.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::6) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SN4PR13MB5812:EE_ X-MS-Office365-Filtering-Correlation-Id: dd8d8e6c-5cb2-4345-29b1-08db4b219f0f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WXsrObXhUbj87weM59e5vAKCPyvhTHaSrLN6oTiYVH4EoIgvU6FE28VCNH4h1FfnDRd1fDfz3zrIdMGBah5XEDg9QSg3E+OP/ZWRF4TSgcGEe5okVHEt5bK2WVOI/xFUU8CZUsyWHPGX195URBWL9YqyL3Eab3QG2oXwBW9+dUMOb2trYAWEf3JK301zI1fIwUW5MJAFUm/vvSHInShx4cfrG/xqCqmt2uds5Bl5Hvn/XHFTM5KwrAwlNeozW0MxvpGKkzvDcqdIxk3nCgPDB+9lWad6YHH7ibVkY9QmZkX4lSpXrskYUzP8UiI9Sv62ZK0K3kwzJO3T0dDTzNT6sJcXAOlejenBPfmoz7+NU4tpEKf9Jtf9M/M4wlm+MvkkvW5hv9n44ZOjXcldHBv7aYsbPPyWzxkeTPQdRJRPi9qDFJphdQBtMCEyN3CzvachSt3yQCW3zydFdCKdLskX/+4CxFHFkaPAfzonHdllmtNGUbVU87vp83oDJRWx9mF/Xv10EEagEzJQl/xgtT1P+DcI7HjNoT31eRKr4ap0HIvlfUMp37psZfNUXiIK9tg4ac4bTKC+xtMXsvJHD55vCYejSaxhJCXn0hPsJLuAQP9ZMbQkquaHgeoJw9KxFjzQYIQoE7taEaAMcqY12B6zTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(396003)(39830400003)(376002)(136003)(346002)(451199021)(41300700001)(66946007)(66556008)(66476007)(6916009)(4326008)(54906003)(6666004)(478600001)(6486002)(86362001)(316002)(36756003)(83380400001)(6512007)(6506007)(8676002)(8936002)(44832011)(5660300002)(4744005)(7416002)(2906002)(2616005)(186003)(38100700002)(67856001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/wY0lDuzSSooCFvIOL5TcYw/ouSZMLsAL6S5JxaJhy6xovnNj1wRZdb4ssjl?= =?us-ascii?Q?2eN+2gGYJy4DhSV3s3QYUuSvexO9/AqGR2oBqtLqmX2d62gvDbDJNKN/OquT?= =?us-ascii?Q?Sh41XHgjw/Rrp8D/XRQ0R3q+sQUsEMFasMlmQGNhLMS7LW+fwV3FCxmDedwn?= =?us-ascii?Q?cVMSMzxFMLTLr7cGr3OUkLF77c/T3zyYySRhgW8En+f9kTQomZDXvqPOscwt?= =?us-ascii?Q?admMvZfSmrL3nzgBOxk5nPRkCcKLSoftL2AsKFXBcOmjHD4yeaQzahFspuRe?= =?us-ascii?Q?KFoUqPmjM71gSMsETvVRMFGTmm0ZPocoUHjzLd4i1Z+fSYeSECgsoX3a9JYH?= =?us-ascii?Q?r8WFwSx5jo0fpMjDS6TD3bSLmXIYTLnFcqByBN4W4OSqHR6mGsfDRuQ3zHf7?= =?us-ascii?Q?hSGBS/B7prkSd99pCl2LZmm+59vYjpdqAhVZ61MIfHozbadffynsV43QV8BD?= =?us-ascii?Q?1MzeKufqd8DGsCG9lKcv/fHQqNnjW1L0j4zSpQFmqZCdU31CGNFCpgXH7AAy?= =?us-ascii?Q?ZD1UMV2L/xv33XJU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uu29JE3ZBMpJy5FKSmhsNAOYSjOFAcTG1uV6SdwYnJyo34e/2ovD20/bZQMR?= =?us-ascii?Q?jjENbxhl8ZdRopzy/2xXJKQ+ivGebBxCSaaXZXdfUaWoSUTe2gZzk0zc7f+g?= =?us-ascii?Q?41+5GY2O4sRw0EnnC77PJGZdyWDb3sBqD7oDGtTgKusaMwo0DYpzs7lw4K4k?= =?us-ascii?Q?ZpF8K1IHTdCffI2OBL1fxEDE1HAtK1bx0BiPD6XV2ZEuTptifJXaht5zGsDe?= =?us-ascii?Q?HkqzvA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd8d8e6c-5cb2-4345-29b1-08db4b219f0f X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2023 15:26:38.1512 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CnJF9PfbemARxExphEgZ7HqiWANBuufv3seRpYJvYEsaHiGCxoA0Ot8h0nZMTq91Uujcnc/eytlSJqYnGRS+iNeCtqnUHiJJuZBrTkJMKI0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5812 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 27, 2023 at 08:23:38PM +0900, Dominique Martinet wrote: > The 9p code for some reason used to initialize variables outside of the > declaration, e.g. instead of just initializing the variable like this: > > int retval = 0 > > We would be doing this: > > int retval; > retval = 0; > > This is perfectly fine and the compiler will just optimize dead stores > anyway, but scan-build seems to think this is a problem and there are > many of these warnings making the output of scan-build full of such > warnings: > fs/9p/vfs_inode.c:916:2: warning: Value stored to 'retval' is never read [deadcode.DeadStores] > retval = 0; > ^ ~ > > I have no strong opinion here, but if we want to regularily run s/regularily/regularly/ > scan-build we should fix these just to silence the messages. > > I've confirmed these all are indeed ok to remove. Likewise, these look good to me. > Signed-off-by: Dominique Martinet Reviewed-by: Simon Horman