From patchwork Mon Jan 25 03:20:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 12042879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC3F7C433DB for ; Mon, 25 Jan 2021 03:20:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A02B224B1 for ; Mon, 25 Jan 2021 03:20:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A02B224B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AD9346B0005; Sun, 24 Jan 2021 22:20:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A89566B0007; Sun, 24 Jan 2021 22:20:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99FE48D0001; Sun, 24 Jan 2021 22:20:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 854B86B0005 for ; Sun, 24 Jan 2021 22:20:12 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 54012180AD837 for ; Mon, 25 Jan 2021 03:20:12 +0000 (UTC) X-FDA: 77742843864.16.comb98_0b030b927582 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 2DB08100E6903 for ; Mon, 25 Jan 2021 03:20:12 +0000 (UTC) X-HE-Tag: comb98_0b030b927582 X-Filterd-Recvd-Size: 1725 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 03:20:10 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UMka-xS_1611544806; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UMka-xS_1611544806) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Jan 2021 11:20:07 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/filemap: Remove redundant variable's assignment Date: Mon, 25 Jan 2021 11:20:02 +0800 Message-Id: <08dc7237b44b9455ab095b44dc6969a1607b08db.1611544316.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 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: We've already set the variable 'i' 's initial value before using it, thus remove redundant previous assignment of variable 'i'. Signed-off-by: Baolin Wang Reviewed-by: Miaohe Lin --- mm/filemap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index e4906f5..07b02f3 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2472,7 +2472,6 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb, if ((iocb->ki_flags & IOCB_WAITQ) && written) iocb->ki_flags |= IOCB_NOWAIT; - i = 0; pg_nr = generic_file_buffered_read_get_pages(iocb, iter, pages, nr_pages); if (pg_nr < 0) {