Skip to contentSkip to conversation

kthread: unexport __kthread_should_park()

PATCH Applied Greg Kroah-Hartman 2 participants 2 messages Aug 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kthread: unexport __kthread_should_park()

There are no in-kernel users of __kthread_should_park() so mark it as static and do not export it.

Cc John Stultz <[email protected]>
Cc "Peter Zijlstra (Intel)" <[email protected]>
Cc "Arve Hjønnevåg" <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Andrew Morton <[email protected]>
Cc "Christian Brauner (Microsoft)" <[email protected]>
Cc Mike Christie <[email protected]>
Cc Kees Cook <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Zqiang <[email protected]>
Cc Prathu Baronia <[email protected]>
Cc Sami Tolvanen <[email protected]>
---
 include/linux/kthread.h | 1 -
 kernel/kthread.c        | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
include/linux/kthread.h +0 -1
index f1f95a71a4bc..2c30ade43bc8 100644
@@ -88,7 +88,6 @@ void kthread_bind_mask(struct task_struct *k, const struct cpumask *mask);
 int kthread_stop(struct task_struct *k);
 bool kthread_should_stop(void);
 bool kthread_should_park(void);
-bool __kthread_should_park(struct task_struct *k);
 bool kthread_should_stop_or_park(void);
 bool kthread_freezable_should_stop(bool *was_frozen);
 void *kthread_func(struct task_struct *k);
kernel/kthread.c +1 -2
index 4fff7df17a68..1eea53050bab 100644
@@ -159,11 +159,10 @@ bool kthread_should_stop(void)
 }
 EXPORT_SYMBOL(kthread_should_stop);
 
-bool __kthread_should_park(struct task_struct *k)
+static bool __kthread_should_park(struct task_struct *k)
 {
 	return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags);
 }
-EXPORT_SYMBOL_GPL(__kthread_should_park);
 
 /**
  * kthread_should_park - should this kthread park now?
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Greg Kroah-Hartman

There are no in-kernel users of __kthread_should_park() so mark it as static and do not export it.

Cc John Stultz <[email protected]>
Cc "Peter Zijlstra (Intel)" <[email protected]>
Cc "Arve Hjønnevåg" <[email protected]>
Cc Valentin Schneider <[email protected]>
Cc Andrew Morton <[email protected]>
Cc "Christian Brauner (Microsoft)" <[email protected]>
Cc Mike Christie <[email protected]>
Cc Kees Cook <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Zqiang <[email protected]>
Cc Prathu Baronia <[email protected]>
Cc Sami Tolvanen <[email protected]>

Yeah. Seems like it got an EXPORT because it was duplicating the neighboring functions?

Signature · 1 line
Kees Cook