Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp261172pxj; Fri, 7 May 2021 08:07:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfJlqSP/yxF73k5ktFWlSkJvnNdZwZ6gVKECJ/jgoA+9/QZ5QNmsOzi/WeMx8DheCUUxXC X-Received: by 2002:a17:90a:8c8b:: with SMTP id b11mr10868479pjo.236.1620400045932; Fri, 07 May 2021 08:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620400045; cv=none; d=google.com; s=arc-20160816; b=Unjc5oRL/ZAlySnZ0+7RUMbWBFDBXRp9JfjAti+VRqdjCu7bM03QYs0lUSkRld1Drl auc9K/3VVdX+9HkyIpM7Zt2qSn5v1x6+3QKefDPFTdwNYKke5Vtp7oOvXqkBp1mVGs30 eBgnkPJsokb/lL9OPVcsHqQGyf/Tcmd9LGBPiyC4CRJmlY4YPDsRVXW02ePBfWxqUPU1 fO6/2UTUrnrcEmZLsGFtbsmInsSdnHoxvLvP5vVw/pLJypL7ZlUV6BasnXgSWXNUIcHI HuS1uk3vL/IbctPC1eTtnHXgPL71u4W4Qp3u/ol4f+XxfwJIji8TH5mX8QtT0N+MF1ZF Hn9Q== 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=h6CvEcH6lldBrL2qLaHVXZy3e+T1NuPGpyfPejetds0=; b=uB7XmvwDOz8wDGOJLCxSlhALgfMXzh99otHTzfpbTt7GddDDTBp/GihAaj3wdSNeXJ u6ZidPiM1ywV74aedMOX96MxdH806qvAH/aH3yhQr/MIyZSy3yPZz43Ip8mt/ftC/HYv r9D97K71HKadhn2BefThp/ZONQVdl0I/UgIhlSgvLMbqA/inS1ZueQ+gyYlnFx7oQC8S taFO6xKwqVHxb9od8XqGxuTJY6N0k4iSWQFMcPdhnXT8rBilJ+inzhm2jLk2P8B2nY1v 6t+Jtm2ZTAGMod9gWXm0S0VlI4E0/AV2mtDjkVvTjft8S48ISBu81s4JOjp2EcPqP6YW 7YcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Qw4zqJpF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si14249198pjv.24.2021.05.07.08.07.12; Fri, 07 May 2021 08:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Qw4zqJpF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233414AbhEGL26 (ORCPT + 99 others); Fri, 7 May 2021 07:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbhEGL25 (ORCPT ); Fri, 7 May 2021 07:28:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8243C061574; Fri, 7 May 2021 04:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=h6CvEcH6lldBrL2qLaHVXZy3e+T1NuPGpyfPejetds0=; b=Qw4zqJpFLXiQznZE5OIje3iLqG CbDZq8d/AP6HJwb5i1uHSBYY4f2FopWSLv7vnxc3M8sKVrirNyrWLLRoIVUcOqsV4iQsCO9Jj9Rva p4eHXt3DK25broDK4Leypw5Au9ahUm28GiF8Q4kVaH5zREKLrpIEs/jQ1d6ucXey7hliD9B2shx83 fMUVNtyPXpke6wjcNhi6bD3/+zIQnWvlLFHjHqwr7/L/vCXWLGK7sXEFzNUdxDXXeSPFj6sLoRC0l AlxeY2gTzTg56w8av0PKdjgnTeTPg4Pj3A4AWybav1cH7va74YPYqgr1ma2tLIZaep2xFvz8xauBq H+pzBdRA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1leycw-0037m0-6f; Fri, 07 May 2021 11:26:41 +0000 Date: Fri, 7 May 2021 12:26:38 +0100 From: Matthew Wilcox To: Jiapeng Chong Cc: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] sysctl: Remove redundant assignment to first Message-ID: References: <1620382554-62511-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1620382554-62511-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 07, 2021 at 06:15:54PM +0800, Jiapeng Chong wrote: > Variable first is set to '0', but this value is never read as it is > not used later on, hence it is a redundant assignment and can be > removed. > > Clean up the following clang-analyzer warning: > > kernel/sysctl.c:1562:4: warning: Value stored to 'first' is never read > [clang-analyzer-deadcode.DeadStores]. While this is true, it is incomplete. The 'first' declaration should be moved into the 'else' arm of the 'if (write)' conditional.