Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7033024rwr; Tue, 2 May 2023 08:36:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ510o7Hum73Tzg4uTpQcOWPTtJsC/yY+qFht9UPDx+sF+9RDv7pLaxFtr40xczcw3toxPbK X-Received: by 2002:a05:6a21:918c:b0:c6:c0c1:b1fe with SMTP id tp12-20020a056a21918c00b000c6c0c1b1femr18064890pzb.57.1683041816495; Tue, 02 May 2023 08:36:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683041816; cv=pass; d=google.com; s=arc-20160816; b=LehZqc6NUqcbqeOmvxqkM5qIhYQru78XPlLX7zE/TOjB1kX+jxnSMh8AnZiNe2eGAT wbGVckF4We3WGS7ykj8dGuTB1yGplt5sEKY/mdDdKKwiWDphswy0kGIfxw2C1Mnqq3ic CrzIL+0aGoFToxrjYTIuqxm4iY49k3aD4wtsY0fa9KKb1jvdzvky/heoVzXw+OTIjPva Asmsss3Yyk1wIp1TK039+7mCTdNUc2fLymRXGLcfFJX1L6ixZ4Cpeo1071r4VxD2hRAE dmu6uGgGApWGAW/FNxlVW7KSQaEHDG+I9GpGVcu4IpRyXq/NSmrejKNFo5vFY8ch22NP n/BA== 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=K0/fhKIHrNqrMaTXCqWzATqggBGTePEzC+dtnANkswg=; b=MXuOMaLj9QX9KVhQBzzEt4H+cgQXUphAZ2zmjk9kdBNK+jVq09COw0FvsHAQiQKahE z7SvwOSYE//2qKOEfrk0/9PvmWj76M6Zd0+Szu9CYFRpZQlgqMy6+j/rMdB+ZBsyze6D h5ou4EioDSqlxufpXw1Su3mJ4EDS5PFq9qfEGWB2NBfu1N56PrnUhfAgYj4Z9DogdHPE JXiWkHQU619z+7P8rqYMHW+o0eaG2TiyVdpM0EXGjL+vsSVGnIsPYBkN4muQhTUBX9J9 DNDqgrZwCKi2GCIYtDiXOmgrZy4QZ0e5oNxc49IZBT95HalBMASblMpqm6GGSXF9ggJ2 m+aQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=Ustlv57T; 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 l185-20020a6391c2000000b0051fc46e23fesi26240249pge.126.2023.05.02.08.36.41; Tue, 02 May 2023 08:36: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=Ustlv57T; 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 S234558AbjEBP1t (ORCPT + 99 others); Tue, 2 May 2023 11:27:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234589AbjEBP1l (ORCPT ); Tue, 2 May 2023 11:27:41 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2130.outbound.protection.outlook.com [40.107.244.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1689D2701; Tue, 2 May 2023 08:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mRGjOkHAmaLxT5/koH3urDIE+6vokmD+eUrICTOLGcxSyLzS28HRii3XmNOUFmIK9TzQtenKKTBfPIQEDeeBBSmj/yJs88J1SShiuBmlXYxUJGgMfC8d+y8obw/CPm32kb67Yo4VF5hHPT/hHktGrO3zQtpwaOd6e53th+SBUQYnWW5xE/oHZ2sQQ0hzDnCKuv7IasxPs5f6THNhRy/ub/fzSKRVZfX2v3rESkLzcd77hD1GmtGefTDaF/lFHkw2yCuU9dOChq9wQzMV/8/1vLpqH9yhfZ69qm8hIrm34Xo15V/KxCDi5fbP2+zF/mmp9M2TTzhHoqmvyRU0qj67lA== 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=K0/fhKIHrNqrMaTXCqWzATqggBGTePEzC+dtnANkswg=; b=KDSMCljR3aPRG4zSyv6XqLETG61qudwh6msr6dewQyAM4VKiJ7jn5nclfexzudbYbIfl858/DGfSezsYQjqMufASn3qUmTmXRYgetO/wDWAtvtIWCmu/Dc+n58AP2Q5DgeZzYPU9Qo1LSyX2oixC2muLuY3WFwXXbrS42Duz68fZH4H6vzPQgUs89A3JH07Jht3n7CDLRLKau0fSaT0MWaDT42adtDLOxuOBoPpK2+I89cG1ZwNwLZdtFMKoyAMwOQhm5Agks95AaZst/CfGO9+TuXzv23pRlcySGDXJDu0JENomT+QvtQB9OSEXAnDk5TVfpFBDFDe+STVGEdpSjw== 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=K0/fhKIHrNqrMaTXCqWzATqggBGTePEzC+dtnANkswg=; b=Ustlv57TDN32jceHxMIt60le52tIlq+eJBmGeABurSCTiGMiCM/agyWOVxQi1Wle44CTzAyc36iRaexeowJanuqaOAPL9uiucxASmIYIvejKP5LqTRFfppApvTFyBTA1JXvr7ENYNNl++hXuHYoX0vcxWoxpl+0GilyfDXjlA4g= 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 BY5PR13MB3636.namprd13.prod.outlook.com (2603:10b6:a03:21a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Tue, 2 May 2023 15:27:15 +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:27:15 +0000 Date: Tue, 2 May 2023 17:27:09 +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 4/5] 9p: virtio: skip incrementing unused variable Message-ID: References: <20230427-scan-build-v1-0-efa05d65e2da@codewreck.org> <20230427-scan-build-v1-4-efa05d65e2da@codewreck.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230427-scan-build-v1-4-efa05d65e2da@codewreck.org> X-ClientProxiedBy: AM4PR05CA0023.eurprd05.prod.outlook.com (2603:10a6:205::36) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|BY5PR13MB3636:EE_ X-MS-Office365-Filtering-Correlation-Id: 95b78f36-c64c-4723-bab4-08db4b21b590 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z/oO2smPkyJ3rQinudUvjOp0APxQB2QZO4eXNuDclfmdHPpK75gLotkbJoWca29oE5/JFod3nTSzSN7w+qEN0qdmdg5UdHVfyNZr3kM9GO+e8d4QsykLxkZAaSmeNZ7mbMfB0BFF7WwGNrSHHYr/XBUf8vbkuSqInn6DxSny5D0waUS8M4aEN22PwtRbzQxKoWTZlu/FaqlrlPE6mbKQP1spvr0T25jLgp+znNvbnNh9a/e+4mJlGZlQASIEPUD+xWSOr26Pu6e6KFoxKHpAeHMQ99lPt6OVbS41QhNSrnLff/lY5DgOhjjeTH7K4mpnOEYmzbh0mc3SNn3p6ZOCitj1uyQGsCaAnvrs70xPY68pq4zhjWL4kPXSD2GpGzN3OzVdkYlyYvxX+Unel7AevRvrWWMSoZb9/+zCh6yX/xoRAxzbLETeFOJujPgYX5rB/8ue5RDrDn0iSYdAvxkcfD9frf13yZN+O6X6ehMBHRxE38V56nYGQLeXjSN1+5uxDBFmyyavjw6m3imBsp8R714wvVm2SuyYqPa1y5EfjjChAS0yNBQPgiYUIbdNuhl6 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)(346002)(376002)(39830400003)(136003)(396003)(366004)(451199021)(8936002)(4744005)(38100700002)(2906002)(41300700001)(7416002)(44832011)(8676002)(5660300002)(36756003)(86362001)(6486002)(6666004)(6506007)(6512007)(54906003)(478600001)(83380400001)(2616005)(186003)(66556008)(6916009)(66946007)(66476007)(4326008)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VSmp3H6sBm3P1KSHuRleb408EaaooStRX/KonOwwF9I9XcOGgAMjpux8RhEK?= =?us-ascii?Q?06LdAuJl7lYVIwSPlSbtotT27gApHXZyFhx+wQDcXMEFfwfLTAABLn7O4EIy?= =?us-ascii?Q?Gk6CDLBojpabs5oj3xYV3ELylBwDeEborVxrgUl/rQc8C4n1AF1YUdRFAWas?= =?us-ascii?Q?22+aaQYZ7fpjJuhzL3XJlsKc6IvMoX+so5G/COqucNnlxSMgN8XpMby6ym2Q?= =?us-ascii?Q?tnWH6SjScm/kW3HopGq56H6KJIU8kvRtI4X3NlSIOKb6tOMFoJCLej5F21DP?= =?us-ascii?Q?SHSVF7BnnRwNQXcvJoWOgnsmZf3slnrJjfWfVaA3WqhZ3czDsqZH3Wr5ie4B?= =?us-ascii?Q?9X3tx5yapTR+1iEjud0RQbCBuiUQQIuXdPoYB9S56Lg0txATWXPFurgsW7wP?= =?us-ascii?Q?TO4y+ANt0gDS80gN1Ia16tvGZHbFFtHcLonOZht0qQiIb6dR0Rk79S+TFLC8?= =?us-ascii?Q?1tkePd3/k0siAVzWJwQa50URoLJFGAGraL6IKfHxUuUgc/pXwAg1phoGu5M0?= =?us-ascii?Q?fbjkdTCgv+e7+oAOB+PgwX3HV/yQueLzUpyqSNOmXZpBYdZ+6aWGc6kvRBq7?= =?us-ascii?Q?HtLFGxihPCddGOSpQa61z3n4I0MOqDgx35v/25PYHtnudRMpNrRqRbq76fL5?= =?us-ascii?Q?wm1/uJWSYjjDN60vzhKEBDo6ak2+BDnTLl7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BjAcdKQeHePXOR8LOtaBoMB6aSk/x9p0FOpPHNaBnnWfq9uWPcD5nL?= =?us-ascii?Q?fhNZTy1SFEacgGz0iaPEGueTz97kNqoeNT+TkeRiYMxWN/5vVCDzuTjdPXRB?= =?us-ascii?Q?rmieog=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95b78f36-c64c-4723-bab4-08db4b21b590 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:27:15.7931 (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: 9148JDWCESwpFMiFqj/rEeHxfi/unPfhiq2aSm3IxCy4Qh33ajfljfgKyDAESFxmTTJbz6hQGIaNptGxiw+nPSrf7KgU2Z3WiQqN20omjLQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB3636 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:37PM +0900, Dominique Martinet wrote: > Fix the following scan-build warning: > net/9p/trans_virtio.c:504:3: warning: Value stored to 'in' is never read [deadcode.DeadStores] > in += pack_sg_list_p(chan->sg, out + in, VIRTQUEUE_NUM, > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I'm honestly not 100% sure about this one; I'm tempted to think we > could (should?) just check the return value of pack_sg_list_p to skip > the in_sgs++ and setting sgs[] if it didn't process anything, but I'm > not sure it should ever happen so this is probably fine as is. > > Just removing the assignment at least makes it clear the return value > isn't used, so it's an improvement in terms of readability. > > Signed-off-by: Dominique Martinet Reviewed-by: Simon Horman