From patchwork Fri Nov 5 20:48:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605907 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 0E115C433F5 for ; Fri, 5 Nov 2021 20:48:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0FAF60FBF for ; Fri, 5 Nov 2021 20:48:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0FAF60FBF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7D4F19400F7; Fri, 5 Nov 2021 16:48:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 786269400EF; Fri, 5 Nov 2021 16:48:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69AF29400F7; Fri, 5 Nov 2021 16:48:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 58D769400EF for ; Fri, 5 Nov 2021 16:48:06 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 217B11856AD5B for ; Fri, 5 Nov 2021 20:48:06 +0000 (UTC) X-FDA: 78776063772.07.C139080 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP id C776CF00039E for ; Fri, 5 Nov 2021 20:48:05 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id DE9EF60E94; Fri, 5 Nov 2021 20:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636145285; bh=sGFNxz2N1YWJUJLa6sSjdrPx0R2KpQItJ3kc8xQtrno=; h=Date:From:To:Subject:In-Reply-To:From; b=iO0wvjhyBQRCrgBN2bSKGMhc7ZjHPe3bcw1fr5Xe47hwqxKXYMgvWaj9djxjLcUBa gBCEiqsNMEkBf95GPiW2D5Y5fp5kuV0U+Xj8La4ANGY961GCuot3YCVPYVV0NWXTXN e+o1o2UZYOnK8N5Sa/UH+QRpinyPJmIezXW14+IU= Date: Fri, 05 Nov 2021 13:48:04 -0700 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, sj@kernel.org, torvalds@linux-foundation.org, xhao@linux.alibaba.com Subject: [patch 254/262] mm/damon: remove unnecessary variable initialization Message-ID: <20211105204804.WWEtMEnCD%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=iO0wvjhy; dmarc=none; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: C776CF00039E X-Stat-Signature: hyjsyrxnt1df9iaa49awdfwrpas9df4u X-HE-Tag: 1636145285-864929 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: Xin Hao Subject: mm/damon: remove unnecessary variable initialization Patch series "mm/damon: Fix some small bugs", v4. This patch (of 2): In 'damon_va_apply_three_regions', There is no need to set variable 'i' as 0 Link: https://lkml.kernel.org/r/b7df8d3dad0943a37e01f60c441b1968b2b20354.1634720326.git.xhao@linux.alibaba.com Link: https://lkml.kernel.org/r/cover.1634720326.git.xhao@linux.alibaba.com Signed-off-by: Xin Hao Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton --- mm/damon/vaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/damon/vaddr.c~mm-damon-remove-unnecessary-variable-initialization +++ a/mm/damon/vaddr.c @@ -306,7 +306,7 @@ static void damon_va_apply_three_regions 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) {