From patchwork Thu Nov 18 11:48:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12626813 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 8DE45C433F5 for ; Thu, 18 Nov 2021 11:48:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2DDB26126A for ; Thu, 18 Nov 2021 11:48:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2DDB26126A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 972846B0072; Thu, 18 Nov 2021 06:48:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 921796B0073; Thu, 18 Nov 2021 06:48:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 810CD6B0074; Thu, 18 Nov 2021 06:48:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 701B76B0072 for ; Thu, 18 Nov 2021 06:48:42 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 33ED689B2C for ; Thu, 18 Nov 2021 11:48:32 +0000 (UTC) X-FDA: 78821878464.25.2944EC7 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP id C36AA70000A4 for ; Thu, 18 Nov 2021 11:48:30 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4BC5961B73; Thu, 18 Nov 2021 11:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637236110; bh=2v6CX91Q4EmCkrLi3MAf4ORyXyLtzCcdr8MbBfORAKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PSd2mQM6MjYFfZXhEo/Ho1V3Ckfp0Piqqy7AvITJXlh5uB5LKvw2CSjI4MN2lxr0/ Z5ebmvnUaBkItAQIVRdpDdcZDrQtm/kNdGx9tTrhIJMC58/YBIf1YCzngfgidVw9Zo 29etow0YnzAvsb30CJ3tRM8uU16W+mQ0Wg5aUeC524hDKBnsxOGcPAsCN2TzOsulMt uErIuXO+rGzJ+irYw/iCAcZv+Fl7zTDltcrXS+kpCMuYJL5A1LtSbwAOOufT+qdD5w MQSQwkc/THQmO9Awvksk3R/NhSD03JJh0YDj20eAnzr7wicig2tv0L0tYirqbvaYVF 4+WR2am/YnOMQ== From: SeongJae Park To: akpm@linux-foundation.org Cc: sj@kernel.org, xhao@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/damon: Fixup trivial nits in mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch Date: Thu, 18 Nov 2021 11:48:27 +0000 Message-Id: <20211118114827.20052-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211115174837.wvyS8FbLx%25akpm@linux-foundation.org> References: <20211115174837.wvyS8FbLx%25akpm@linux-foundation.org> X-Rspamd-Queue-Id: C36AA70000A4 X-Stat-Signature: cn85umz6eaxtkq849kyfftuz3fuptrq7 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PSd2mQM6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspamd-Server: rspam02 X-HE-Tag: 1637236110-367991 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: mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch[1], which is merged in -mm but mainline yet, is making unnecessary function prototype position changes in the damon.h. This could make later 'git-blame' a little bit complex. It also violates the 80 columns limit, which is not madated but preferred and all other code of DAMON is following. This commit fixes those. This should be folded into the patch before it is sent to Linus. [1] https://lore.kernel.org/mm-commits/20211115174837.wvyS8FbLx%25akpm@linux-foundation.org/ Signed-off-by: SeongJae Park --- include/linux/damon.h | 4 ++-- mm/damon/paddr.c | 5 +++-- mm/damon/vaddr.c | 8 +++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 82c0888eeab7..1d1be348f506 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -461,13 +461,13 @@ int damon_stop(struct damon_ctx **ctxs, int nr_ctxs); #endif /* CONFIG_DAMON */ #ifdef CONFIG_DAMON_VADDR -void damon_va_set_primitives(struct damon_ctx *ctx); bool damon_va_target_valid(void *t); +void damon_va_set_primitives(struct damon_ctx *ctx); #endif /* CONFIG_DAMON_VADDR */ #ifdef CONFIG_DAMON_PADDR -void damon_pa_set_primitives(struct damon_ctx *ctx); bool damon_pa_target_valid(void *t); +void damon_pa_set_primitives(struct damon_ctx *ctx); #endif /* CONFIG_DAMON_PADDR */ #endif /* _DAMON_H */ diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 5c3a29d32638..4318134cbc4c 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -246,8 +246,9 @@ static int damon_pa_apply_scheme(struct damon_ctx *ctx, struct damon_target *t, return 0; } -static int damon_pa_scheme_score(struct damon_ctx *context, struct damon_target *t, - struct damon_region *r, struct damos *scheme) +static int damon_pa_scheme_score(struct damon_ctx *context, + struct damon_target *t, struct damon_region *r, + struct damos *scheme) { switch (scheme->action) { case DAMOS_PAGEOUT: diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index b18ec8b4f3c6..79481f0c2838 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -281,7 +281,8 @@ static void damon_va_init(struct damon_ctx *ctx) * * Returns true if it is. */ -static bool damon_intersect(struct damon_region *r, struct damon_addr_range *re) +static bool damon_intersect(struct damon_region *r, + struct damon_addr_range *re) { return !(r->ar.end <= re->start || re->end <= r->ar.start); } @@ -623,8 +624,9 @@ static int damon_va_apply_scheme(struct damon_ctx *ctx, struct damon_target *t, return damos_madvise(t, r, madv_action); } -static int damon_va_scheme_score(struct damon_ctx *context, struct damon_target *t, - struct damon_region *r, struct damos *scheme) +static int damon_va_scheme_score(struct damon_ctx *context, + struct damon_target *t, struct damon_region *r, + struct damos *scheme) { switch (scheme->action) {