From patchwork Wed Sep 30 18:53:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 11810127 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3128D112E for ; Wed, 30 Sep 2020 19:13:42 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91458206A1 for ; Wed, 30 Sep 2020 19:13:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.elisa.tech header.i=@lists.elisa.tech header.b="IOZiMRjW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91458206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+72012+49+4688437+8417402@lists.elisa.tech X-Received: by 127.0.0.2 with SMTP id B81EYY4689772xmce64smwfe; Wed, 30 Sep 2020 12:13:40 -0700 X-Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web10.2051.1601492163856650390 for ; Wed, 30 Sep 2020 11:56:04 -0700 X-Received: by mail-wm1-f68.google.com with SMTP id l15so627846wmh.1 for ; Wed, 30 Sep 2020 11:56:03 -0700 (PDT) X-Gm-Message-State: 6LW0wPkcXp0386GoKs6jRs0Jx4688437AA= X-Google-Smtp-Source: ABdhPJz6jU82fHCmCavBCON5X8sKCcNR+NtXto749V07XtSAdZscMEHkP3ri32LD70Ul2sC3h2itBQ== X-Received: by 2002:a7b:c750:: with SMTP id w16mr4594827wmk.16.1601492162236; Wed, 30 Sep 2020 11:56:02 -0700 (PDT) X-Received: from localhost.localdomain (host-92-5-241-147.as43234.net. [92.5.241.147]) by smtp.gmail.com with ESMTPSA id u12sm4544040wrt.81.2020.09.30.11.56.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2020 11:56:01 -0700 (PDT) From: Sudip Mukherjee To: Alexey Dobriyan , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-safety@lists.elisa.tech, Sudip Mukherjee Subject: [linux-safety] [PATCH] proc: remove a pointless assignment Date: Wed, 30 Sep 2020 19:53:59 +0100 Message-Id: <20200930185359.27526-1-sudipm.mukherjee@gmail.com> Precedence: Bulk List-Unsubscribe: Sender: linux-safety@lists.elisa.tech List-Id: Mailing-List: list linux-safety@lists.elisa.tech; contact linux-safety+owner@lists.elisa.tech Delivered-To: mailing list linux-safety@lists.elisa.tech List-Post: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.elisa.tech; q=dns/txt; s=20140610; t=1601493220; bh=x1zbqkqvIUOITda1cnE1gexr2rgfojpsxBlsVETsH2w=; h=Cc:Date:From:Subject:To; b=IOZiMRjW6FvCCugUjJPMDz9jLysEvJ/Ge3OXRMaJJzp1hzyd0hHq74bT7pecoXQDMPi L6mNQcaoqaTfGuLlAkdax5Qm6sR4HCUN2hVyFXKIwkoX3KqMPRFCjxGaaaQwrsmWiFq+0 kUNAW33VzqM0mPHiyg76C6iCtIaCEi/ApFU= The variable 'env_start' has only been used for the if condition before this assignment and is never read after this. So, remove the assignement. Signed-off-by: Sudip Mukherjee --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index aa69c35d904c..238925ff3a80 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -279,7 +279,7 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, char __user *buf, * only when it overflows into the environment area. */ if (env_start != arg_end || env_end < env_start) - env_start = env_end = arg_end; + env_end = arg_end; len = env_end - arg_start; /* We're not going to care if "*ppos" has high bits set */