linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/damon: Fixup trivial nits in mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch
       [not found] <20211115174837.wvyS8FbLx%25akpm@linux-foundation.org>
@ 2021-11-18 11:48 ` SeongJae Park
  2021-11-18 12:04   ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: SeongJae Park @ 2021-11-18 11:48 UTC (permalink / raw)
  To: akpm; +Cc: sj, xhao, linux-mm, linux-kernel

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 <sj@kernel.org>
---
 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) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/damon: Fixup trivial nits in mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch
  2021-11-18 11:48 ` [PATCH] mm/damon: Fixup trivial nits in mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch SeongJae Park
@ 2021-11-18 12:04   ` SeongJae Park
  0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2021-11-18 12:04 UTC (permalink / raw)
  To: SeongJae Park; +Cc: akpm, xhao, linux-mm, linux-kernel, mm-commits

CC-ing mm-commits.


Thanks,
SJ

On Thu, 18 Nov 2021 11:48:27 +0000 SeongJae Park <sj@kernel.org> wrote:

> 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 <sj@kernel.org>
> ---
>  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) {
> -- 
> 2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-18 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211115174837.wvyS8FbLx%25akpm@linux-foundation.org>
2021-11-18 11:48 ` [PATCH] mm/damon: Fixup trivial nits in mm-damon-remove-some-no-need-func-definitions-in-damonh-file.patch SeongJae Park
2021-11-18 12:04   ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).