From patchwork Thu Jan 20 02:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12718208 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80CECC433EF for ; Thu, 20 Jan 2022 02:09:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 108B66B00C1; Wed, 19 Jan 2022 21:09:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B57C6B00C2; Wed, 19 Jan 2022 21:09:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E70EA6B00C3; Wed, 19 Jan 2022 21:09:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id CCBDD6B00C1 for ; Wed, 19 Jan 2022 21:09:46 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8FDDB8DC27 for ; Thu, 20 Jan 2022 02:09:46 +0000 (UTC) X-FDA: 79049034372.12.5E8D963 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 68268C0008 for ; Thu, 20 Jan 2022 02:09:46 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 824BF61522; Thu, 20 Jan 2022 02:09:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3E51C004E1; Thu, 20 Jan 2022 02:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642644584; bh=3MpVi9ZSpCjAtGbl6JawZx+bYZ0/IH5q07XDl7taqfI=; h=Date:From:To:Subject:In-Reply-To:From; b=ffaWhGbWNp8KSaLH/NuH//Y5hcPVp0NEPCFezyxWdotux963qKBUe/Qmjz5szCI8J LEt6RaUUAawOfOAf8BZY2QhnnShMqSNZreJ+OAE0B1fCbHZFWekFai7R2ckUG4kIBH koNlO1gVf/bjx8Yj0UInIEDxZPBuSpM765OC9LGY= Date: Wed, 19 Jan 2022 18:09:44 -0800 From: Andrew Morton To: akpm@linux-foundation.org, colin.i.king@gmail.com, konishi.ryusuke@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 38/55] nilfs2: remove redundant pointer sbufs Message-ID: <20220120020944.GQSPXcdh_%akpm@linux-foundation.org> In-Reply-To: <20220119180714.9e187ce100e4510de3cd9f7d@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 68268C0008 X-Stat-Signature: y3auex7ic4pstysjtr8qamew19cad6ns Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=ffaWhGbW; dmarc=none; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1642644586-987832 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Colin Ian King Subject: nilfs2: remove redundant pointer sbufs Pointer sbufs is being assigned a value but it's not being used later on. The pointer is redundant and can be removed. Cleans up scan-build static analysis warning: fs/nilfs2/page.c:203:8: warning: Although the value stored to 'sbufs' is used in the enclosing expression, the value is never actually read from 'sbufs' [deadcode.DeadStores] sbh = sbufs = page_buffers(src); Link: https://lkml.kernel.org/r/20211211180955.550380-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/1640712476-15136-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton --- fs/nilfs2/page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/nilfs2/page.c~nilfs2-remove-redundant-pointer-sbufs +++ a/fs/nilfs2/page.c @@ -195,12 +195,12 @@ void nilfs_page_bug(struct page *page) */ static void nilfs_copy_page(struct page *dst, struct page *src, int copy_dirty) { - struct buffer_head *dbh, *dbufs, *sbh, *sbufs; + struct buffer_head *dbh, *dbufs, *sbh; unsigned long mask = NILFS_BUFFER_INHERENT_BITS; BUG_ON(PageWriteback(dst)); - sbh = sbufs = page_buffers(src); + sbh = page_buffers(src); if (!page_has_buffers(dst)) create_empty_buffers(dst, sbh->b_size, 0);