Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4304891rdb; Thu, 14 Sep 2023 19:53:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1XqEDenFdxl606/Sf9vqea1p3pidqCNqnfUDEodgqBx3NeG2ZWUytUvoSeUrWkbGCkMmj X-Received: by 2002:a17:90b:98:b0:263:e423:5939 with SMTP id bb24-20020a17090b009800b00263e4235939mr305581pjb.28.1694746436447; Thu, 14 Sep 2023 19:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694746436; cv=none; d=google.com; s=arc-20160816; b=zFFjwlChmthaJ0VV2pNramtySfhZhOgtxctCLXca8zOFcPhw/vLsGWXFv8+733UDMx 0w6a1+CKS9ET51IV+1ZcGY8MKIin6sQl6xLAk2jde5oHlc+D7naO6GOkiL7nVo49CQeg KMfZCJf5OtnPtEyBPz6CvnbYbUz7BBw+xkJCcUlyaUVAKgDeTGCKs7xACuigJN3zcU4N R0tVViVL/+3SVK2Z5IwDeun/tJOGs6cIVcDGcR1tr0BoN8OYTeG0PhTdC72XGfBR6edx Gscd45VE6csviaz5cFfS38AVeK4rfFSocw9qVUHboNkHn4jcn9QRZGB/drvxW1fZnsf4 Vhng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5nv6ta+5+IPL0DQgGt4qp4kHWCSK8jkn9EGeLE0STJY=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=xzBpGtKQA2KBhhmgf9FaCFEvAb/36j9vzkExe1LZD7JzcInsdR6FqHfCgIWVgEigp8 HhTCSBVEbMUzh04QFQZk2xU4z2dhKKAB0D+eFUQNftE4xpOfcmQmskJd/qvr1MzQqKFn XfV2wEu5yOXD9XUALVfNm94cNk1tXRfLFWvUqGLVmcA4dc+w3ldtTTMi37fNdtxFrB5g msA6K7oDvw6z9d/dKOqDSfHIIYxqt9y7K+6DqmS0MYm0DhfrC8O5vLiLhfjat1BLdnu6 GtM99GSKevIh0NDS2GdYxm651+3TJI0dX2y/SqakivUVqESBFOFrU7SiyyQTucHCcdAQ 6ysg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GgK6DIT/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id hg19-20020a17090b301300b0026f3395cd7fsi4635116pjb.184.2023.09.14.19.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 19:53:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GgK6DIT/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5974583DCED0; Thu, 14 Sep 2023 19:53:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231755AbjIOCxa (ORCPT + 99 others); Thu, 14 Sep 2023 22:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231859AbjIOCxV (ORCPT ); Thu, 14 Sep 2023 22:53:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97669272C for ; Thu, 14 Sep 2023 19:53:12 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBC4AC43391; Fri, 15 Sep 2023 02:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694746392; bh=RYtjac5KN7rdOK43JC6LnDJ12z7FKzya3dCtCsi8Y0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GgK6DIT/rJEDrFaud01fxNb9X9ulgXc+DHEZpEYNHpQBHaq6gCDhkm5CNvhTtn3nY UbHvgHF8XfDy9iIQIOfKt9G99WrG6wz1rwaSpybz3ut17/5oFJLGNwPwq1dcXrWKXw 07Q++0DI8CyHA7uWn8iE/iur/xjP7LIoSyXDJG46430Bw910FuSgyA45Gs5G4frZcV Ta3OJrD342CslwNXGEcjPCByNlfc4PH3dXgyopGgHEaLztbBRCa9GDKaRR+CsuB4V7 OzStFx2T2Mv1/CPjbye7T09snFeyN6HXv+p2/gZ5lgLUNFJItBRAK+qhQ0xw8XEGD0 hlGk0P+/2eBlQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] mm/damon/core: mark damon_moving_sum() as a static function Date: Fri, 15 Sep 2023 02:52:51 +0000 Message-Id: <20230915025251.72816-9-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915025251.72816-1-sj@kernel.org> References: <20230915025251.72816-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Sep 2023 19:53:44 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email The function is used by only mm/damon/core.c. Mark it as a static function. Signed-off-by: SeongJae Park --- include/linux/damon.h | 2 -- mm/damon/core.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 0fe13482df63..491fdd3e4c76 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -632,8 +632,6 @@ void damon_add_region(struct damon_region *r, struct damon_target *t); void damon_destroy_region(struct damon_region *r, struct damon_target *t); int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges, unsigned int nr_ranges); -unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum, - unsigned int len_window, unsigned int new_value); void damon_update_region_access_rate(struct damon_region *r, bool accessed, struct damon_attrs *attrs); diff --git a/mm/damon/core.c b/mm/damon/core.c index 45cc108c0fe1..b15cf47d2d29 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1587,7 +1587,7 @@ int damon_set_region_biggest_system_ram_default(struct damon_target *t, * * Return: Pseudo-moving average after getting the @new_value. */ -unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum, +static unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum, unsigned int len_window, unsigned int new_value) { return mvsum - nomvsum / len_window + new_value; -- 2.25.1