From patchwork Tue Oct 19 14:26:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: haoxin X-Patchwork-Id: 12570061 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 957A8C433FE for ; Tue, 19 Oct 2021 14:26:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B1A660F9E for ; Tue, 19 Oct 2021 14:26:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4B1A660F9E 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=kvack.org Received: by kanga.kvack.org (Postfix) id B58ED900004; Tue, 19 Oct 2021 10:26:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ABBF6900003; Tue, 19 Oct 2021 10:26:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 934B5900004; Tue, 19 Oct 2021 10:26:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 80F5A900003 for ; Tue, 19 Oct 2021 10:26:15 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3DE1B27DD2 for ; Tue, 19 Oct 2021 14:26:15 +0000 (UTC) X-FDA: 78713411910.03.CC13BCB Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by imf07.hostedemail.com (Postfix) with ESMTP id 6939C10000BB for ; Tue, 19 Oct 2021 14:26:16 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Usyv4Hp_1634653565; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0Usyv4Hp_1634653565) by smtp.aliyun-inc.com(127.0.0.1); Tue, 19 Oct 2021 22:26:07 +0800 From: Xin Hao To: sjpark@amazon.de Cc: xhao@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] mm/damon: Remove unnecessary variable initialization Date: Tue, 19 Oct 2021 22:26:03 +0800 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 X-Stat-Signature: z5ziaradiprprqw7nd8s9c4byi8okfz7 Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.44 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 6939C10000BB X-HE-Tag: 1634653576-306122 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: In 'damon_va_apply_three_regions', There is no need to set variable 'i' as 0 Signed-off-by: Xin Hao Reviewed-by: SeongJae Park --- mm/damon/vaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index b8ba44f69db6..90be463efff7 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -305,7 +305,7 @@ static void damon_va_apply_three_regions(struct damon_target *t, struct damon_addr_range bregions[3]) { struct damon_region *r, *next; - unsigned int i = 0; + unsigned int i; /* Remove regions which are not in the three big regions now */ damon_for_each_region_safe(r, next, t) {