linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/khugepaged: make khugepaged_collapse_control static
@ 2026-01-12 16:18 Ben Dooks
  2026-01-12 16:22 ` Ben Dooks
  2026-01-12 16:33 ` Lorenzo Stoakes
  0 siblings, 2 replies; 6+ messages in thread
From: Ben Dooks @ 2026-01-12 16:18 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, akpm, david, lorenzo.stoakes, Ben Dooks

Make khugepaged_collapse_control as it is not exported.
Fixes the following sparse warning:

mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?

Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 97d1b2824386..c9bd0df632bd 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -826,7 +826,7 @@ static void khugepaged_alloc_sleep(void)
 	remove_wait_queue(&khugepaged_wait, &wait);
 }
 
-struct collapse_control khugepaged_collapse_control = {
+static struct collapse_control khugepaged_collapse_control = {
 	.is_khugepaged = true,
 };
 
-- 
2.37.2.352.g3c44437643



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

* Re: [PATCH] mm/khugepaged: make khugepaged_collapse_control static
  2026-01-12 16:18 [PATCH] mm/khugepaged: make khugepaged_collapse_control static Ben Dooks
@ 2026-01-12 16:22 ` Ben Dooks
  2026-01-12 16:33 ` Lorenzo Stoakes
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2026-01-12 16:22 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, akpm, david, lorenzo.stoakes

On 12/01/2026 16:18, Ben Dooks wrote:
> Make khugepaged_collapse_control as it is not exported.
> Fixes the following sparse warning:
> 
> mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?
> 
> Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Apologies, sent the same patch twice.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


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

* Re: [PATCH] mm/khugepaged: make khugepaged_collapse_control static
  2026-01-12 16:18 [PATCH] mm/khugepaged: make khugepaged_collapse_control static Ben Dooks
  2026-01-12 16:22 ` Ben Dooks
@ 2026-01-12 16:33 ` Lorenzo Stoakes
  2026-01-13  9:26   ` Ben Dooks
  1 sibling, 1 reply; 6+ messages in thread
From: Lorenzo Stoakes @ 2026-01-12 16:33 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-mm, linux-kernel, akpm, david

On Mon, Jan 12, 2026 at 04:18:20PM +0000, Ben Dooks wrote:
> Make khugepaged_collapse_control as it is not exported.
> Fixes the following sparse warning:
>
> mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?

Thanks for the patch, but sorry to say that this has already been addressed in
[0].

[0]: https://lore.kernel.org/all/20251224111351.41042-14-shivankg@amd.com/

>
> Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")

(Small note: for something like this that isn't fixing an actual bug we don't
use a fixes like this).

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  mm/khugepaged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 97d1b2824386..c9bd0df632bd 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -826,7 +826,7 @@ static void khugepaged_alloc_sleep(void)
>  	remove_wait_queue(&khugepaged_wait, &wait);
>  }
>
> -struct collapse_control khugepaged_collapse_control = {
> +static struct collapse_control khugepaged_collapse_control = {
>  	.is_khugepaged = true,
>  };
>
> --
> 2.37.2.352.g3c44437643
>

Cheers, Lorenzo


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

* Re: [PATCH] mm/khugepaged: make khugepaged_collapse_control static
  2026-01-12 16:33 ` Lorenzo Stoakes
@ 2026-01-13  9:26   ` Ben Dooks
  2026-01-13  9:50     ` Lorenzo Stoakes
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2026-01-13  9:26 UTC (permalink / raw)
  To: Lorenzo Stoakes; +Cc: linux-mm, linux-kernel, akpm, david

On 12/01/2026 16:33, Lorenzo Stoakes wrote:
> On Mon, Jan 12, 2026 at 04:18:20PM +0000, Ben Dooks wrote:
>> Make khugepaged_collapse_control as it is not exported.
>> Fixes the following sparse warning:
>>
>> mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?
> 
> Thanks for the patch, but sorry to say that this has already been addressed in
> [0].
> 
> [0]: https://lore.kernel.org/all/20251224111351.41042-14-shivankg@amd.com/
> 
>>
>> Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")
> 
> (Small note: for something like this that isn't fixing an actual bug we don't
> use a fixes like this).

Is this a subsystem preference because I was told I needed it for other
patches.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


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

* Re: [PATCH] mm/khugepaged: make khugepaged_collapse_control static
  2026-01-13  9:26   ` Ben Dooks
@ 2026-01-13  9:50     ` Lorenzo Stoakes
  0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Stoakes @ 2026-01-13  9:50 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-mm, linux-kernel, akpm, david

On Tue, Jan 13, 2026 at 09:26:37AM +0000, Ben Dooks wrote:
> On 12/01/2026 16:33, Lorenzo Stoakes wrote:
> > On Mon, Jan 12, 2026 at 04:18:20PM +0000, Ben Dooks wrote:
> > > Make khugepaged_collapse_control as it is not exported.
> > > Fixes the following sparse warning:
> > >
> > > mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?
> >
> > Thanks for the patch, but sorry to say that this has already been addressed in
> > [0].
> >
> > [0]: https://lore.kernel.org/all/20251224111351.41042-14-shivankg@amd.com/
> >
> > >
> > > Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")
> >
> > (Small note: for something like this that isn't fixing an actual bug we don't
> > use a fixes like this).
>
> Is this a subsystem preference because I was told I needed it for other
> patches.

It's kernel-wide see [0].

If that's not clear, really you only want to do that if a bug
(i.e. something has runtime impact that breaks something) exists in a
released kernel that you are resolving.

It's to help us keep track of when bugs appeared and when they were
resolved, most pertinent to stable backports (if you fixed an actual bug
you'd typically want to Cc stable to kick off a backport).

[0]: https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

>
> --
> Ben Dooks				http://www.codethink.co.uk/
> Senior Engineer				Codethink - Providing Genius
>
> https://www.codethink.co.uk/privacy.html

Thanks, Lorenzo


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

* [PATCH] mm/khugepaged: make khugepaged_collapse_control static
@ 2026-01-12 16:18 Ben Dooks
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2026-01-12 16:18 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, akpm, david, lorenzo.stoakes, Ben Dooks

Make khugepaged_collapse_control as it is not exported.
Fixes the following sparse warning:

mm/khugepaged.c:829:25: warning: symbol 'khugepaged_collapse_control' was not declared. Should it be static?

Fixes: 34d6b470ab9cf ("mm/khugepaged: add struct collapse_control")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 97d1b2824386..c9bd0df632bd 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -826,7 +826,7 @@ static void khugepaged_alloc_sleep(void)
 	remove_wait_queue(&khugepaged_wait, &wait);
 }
 
-struct collapse_control khugepaged_collapse_control = {
+static struct collapse_control khugepaged_collapse_control = {
 	.is_khugepaged = true,
 };
 
-- 
2.37.2.352.g3c44437643



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

end of thread, other threads:[~2026-01-13  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12 16:18 [PATCH] mm/khugepaged: make khugepaged_collapse_control static Ben Dooks
2026-01-12 16:22 ` Ben Dooks
2026-01-12 16:33 ` Lorenzo Stoakes
2026-01-13  9:26   ` Ben Dooks
2026-01-13  9:50     ` Lorenzo Stoakes
  -- strict thread matches above, loose matches on Subject: below --
2026-01-12 16:18 Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox