Skip to contentSkip to conversation

mm/khugepaged: make khugepaged_collapse_control static

PATCH In review Ben Dooks 2 participants 5 messages Jan 12 – Jan 13

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 mm/khugepaged: make khugepaged_collapse_control static

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")
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/khugepaged.c +1 -1
index 97d1b2824386..c9bd0df632bd 100644
@@ -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,
 };
 
Signature · 1 line
2.37.2.352.g3c44437643
author
#1 lore raw
Quoted 7 lines · 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")

Apologies, sent the same patch twice.

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

https://www.codethink.co.uk/privacy.html
#2 lore raw
In reply to Ben Dooks
Quoted 4 lines · 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?

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

[0]: https://lore.kernel.org/all/[email protected]/

Quoted 2 lines
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).

Quoted 19 lines
---
 mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/khugepaged.c +1 -2
index 97d1b2824386..c9bd0df632bd 100644
@@ -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,
 };
 
--
Quoted 2 lines

2.37.2.352.g3c44437643

Cheers, Lorenzo

author
#3 lore raw
Quoted 9 lines · Lorenzo Stoakes
Quoted 4 lines · 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?

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

Quoted 7 lines

[0]: https://lore.kernel.org/all/[email protected]/

Quoted 2 lines
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.

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

https://www.codethink.co.uk/privacy.html
#4 lore raw
Quoted 13 lines · Ben Dooks
Quoted 12 lines · Lorenzo Stoakes
Quoted 4 lines · 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?

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

[0]: https://lore.kernel.org/all/[email protected]/

Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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

Quoted 6 lines

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

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

Thanks, Lorenzo