All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] sched/core: Make some functions static
@ 2019-03-22 14:31 Yue Haibing
  2019-04-18 12:25 ` [tip:sched/core] " tip-bot for YueHaibing
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yue Haibing @ 2019-03-22 14:31 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warnings:

kernel/sched/core.c:6576:11: warning: symbol 'max_cfs_quota_period' was not declared. Should it be static?
kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 kernel/sched/core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4778c48..5ddab2f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6573,8 +6573,8 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
 #ifdef CONFIG_CFS_BANDWIDTH
 static DEFINE_MUTEX(cfs_constraints_mutex);
 
-const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
-const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
+static const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
+static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
 
 static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 
@@ -6654,7 +6654,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
 	return ret;
 }
 
-int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
+static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 {
 	u64 quota, period;
 
@@ -6667,7 +6667,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_quota(struct task_group *tg)
+static long tg_get_cfs_quota(struct task_group *tg)
 {
 	u64 quota_us;
 
@@ -6680,7 +6680,7 @@ long tg_get_cfs_quota(struct task_group *tg)
 	return quota_us;
 }
 
-int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
+static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 {
 	u64 quota, period;
 
@@ -6690,7 +6690,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_period(struct task_group *tg)
+static long tg_get_cfs_period(struct task_group *tg)
 {
 	u64 cfs_period_us;
 
-- 
2.7.0



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

* [tip:sched/core] sched/core: Make some functions static
  2019-03-22 14:31 [PATCH -next] sched/core: Make some functions static Yue Haibing
@ 2019-04-18 12:25 ` tip-bot for YueHaibing
  2019-04-18 12:48   ` Ingo Molnar
  2019-04-18 13:29 ` [PATCH v2 -next] " Yue Haibing
  2019-04-18 14:47 ` [PATCH v3 " Yue Haibing
  2 siblings, 1 reply; 9+ messages in thread
From: tip-bot for YueHaibing @ 2019-04-18 12:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, peterz, yuehaibing, tglx, linux-kernel, torvalds, mingo

Commit-ID:  16e671afb70f28eb189136d1395c59dafecd270a
Gitweb:     https://git.kernel.org/tip/16e671afb70f28eb189136d1395c59dafecd270a
Author:     YueHaibing <yuehaibing@huawei.com>
AuthorDate: Fri, 22 Mar 2019 22:31:53 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 18 Apr 2019 14:19:25 +0200

sched/core: Make some functions static

Fix these sparse warnings:

  kernel/sched/core.c:6576:11: warning: symbol 'max_cfs_quota_period' was not declared. Should it be static?
  kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
  kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
  kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
  kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20190322143153.14416-1-yuehaibing@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 12 ++++++------
 kernel/sched/fair.c |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f4838b78b9f9..7f2a5fd316f8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6521,8 +6521,8 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
 #ifdef CONFIG_CFS_BANDWIDTH
 static DEFINE_MUTEX(cfs_constraints_mutex);
 
-const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
-const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
+static const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
+static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
 
 static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 
@@ -6602,7 +6602,7 @@ out_unlock:
 	return ret;
 }
 
-int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
+static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 {
 	u64 quota, period;
 
@@ -6615,7 +6615,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_quota(struct task_group *tg)
+static long tg_get_cfs_quota(struct task_group *tg)
 {
 	u64 quota_us;
 
@@ -6628,7 +6628,7 @@ long tg_get_cfs_quota(struct task_group *tg)
 	return quota_us;
 }
 
-int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
+static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 {
 	u64 quota, period;
 
@@ -6638,7 +6638,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_period(struct task_group *tg)
+static long tg_get_cfs_period(struct task_group *tg)
 {
 	u64 cfs_period_us;
 
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e5b100b6ba4e..13bafe350abf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2593,7 +2593,7 @@ out:
 /*
  * Drive the periodic memory faults..
  */
-void task_tick_numa(struct rq *rq, struct task_struct *curr)
+static void task_tick_numa(struct rq *rq, struct task_struct *curr)
 {
 	struct callback_head *work = &curr->numa_work;
 	u64 period, now;

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

* Re: [tip:sched/core] sched/core: Make some functions static
  2019-04-18 12:25 ` [tip:sched/core] " tip-bot for YueHaibing
@ 2019-04-18 12:48   ` Ingo Molnar
  2019-04-18 13:17     ` YueHaibing
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2019-04-18 12:48 UTC (permalink / raw)
  To: tglx, linux-kernel, torvalds, hpa, peterz, yuehaibing; +Cc: linux-tip-commits


* tip-bot for YueHaibing <tipbot@zytor.com> wrote:

> Commit-ID:  16e671afb70f28eb189136d1395c59dafecd270a
> Gitweb:     https://git.kernel.org/tip/16e671afb70f28eb189136d1395c59dafecd270a
> Author:     YueHaibing <yuehaibing@huawei.com>
> AuthorDate: Fri, 22 Mar 2019 22:31:53 +0800
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Thu, 18 Apr 2019 14:19:25 +0200
> 
> sched/core: Make some functions static
> 
> Fix these sparse warnings:
> 
>   kernel/sched/core.c:6576:11: warning: symbol 'max_cfs_quota_period' was not declared. Should it be static?
>   kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
>   kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
>   kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
>   kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
>   kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
>   kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?

So unless this is somehow version dependent or other changes interfered, 
this patch wasn't tested very well:

 kernel/sched/fair.o: In function `sched_cfs_period_timer':
 fair.c:(.text+0x920c): undefined reference to `max_cfs_quota_period'
 fair.c:(.text+0x9214): undefined reference to `max_cfs_quota_period'

skipping it for now.

Thanks,

	Ingo

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

* Re: [tip:sched/core] sched/core: Make some functions static
  2019-04-18 12:48   ` Ingo Molnar
@ 2019-04-18 13:17     ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2019-04-18 13:17 UTC (permalink / raw)
  To: Ingo Molnar, tglx, linux-kernel, torvalds, hpa, peterz; +Cc: linux-tip-commits


On 2019/4/18 20:48, Ingo Molnar wrote:
> 
> * tip-bot for YueHaibing <tipbot@zytor.com> wrote:
> 
>> Commit-ID:  16e671afb70f28eb189136d1395c59dafecd270a
>> Gitweb:     https://git.kernel.org/tip/16e671afb70f28eb189136d1395c59dafecd270a
>> Author:     YueHaibing <yuehaibing@huawei.com>
>> AuthorDate: Fri, 22 Mar 2019 22:31:53 +0800
>> Committer:  Ingo Molnar <mingo@kernel.org>
>> CommitDate: Thu, 18 Apr 2019 14:19:25 +0200
>>
>> sched/core: Make some functions static
>>
>> Fix these sparse warnings:
>>
>>   kernel/sched/core.c:6576:11: warning: symbol 'max_cfs_quota_period' was not declared. Should it be static?
>>   kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
>>   kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
>>   kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
>>   kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
>>   kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
>>   kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?
> 
> So unless this is somehow version dependent or other changes interfered, 
> this patch wasn't tested very well:

Well, this patch is sent before commit 2e8e19226398 ("sched/fair: Limit sched_cfs_period_timer() loop

 to avoid hard lockup") merged, which use max_cfs_quota_period in kernel/sched/fair.c

I can rework patch and send v2.

> 
>  kernel/sched/fair.o: In function `sched_cfs_period_timer':
>  fair.c:(.text+0x920c): undefined reference to `max_cfs_quota_period'
>  fair.c:(.text+0x9214): undefined reference to `max_cfs_quota_period'
> 
> skipping it for now.
> 
> Thanks,
> 
> 	Ingo
> 
> .
> 


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

* [PATCH v2 -next] sched/core: Make some functions static
  2019-03-22 14:31 [PATCH -next] sched/core: Make some functions static Yue Haibing
  2019-04-18 12:25 ` [tip:sched/core] " tip-bot for YueHaibing
@ 2019-04-18 13:29 ` Yue Haibing
  2019-04-18 13:40   ` Ingo Molnar
  2019-04-18 14:47 ` [PATCH v3 " Yue Haibing
  2 siblings, 1 reply; 9+ messages in thread
From: Yue Haibing @ 2019-04-18 13:29 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warnings:

kernel/sched/core.c:6524:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
kernel/sched/core.c:6604:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
kernel/sched/core.c:6617:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
kernel/sched/core.c:6630:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
kernel/sched/core.c:6640:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: do not make max_cfs_quota_period static, which has be used in kernel/sched/fair.c
---
 kernel/sched/core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f9e9117..226d68c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6521,7 +6521,7 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
 static DEFINE_MUTEX(cfs_constraints_mutex);
 
 const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
-const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
+static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
 
 static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 
@@ -6601,7 +6601,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
 	return ret;
 }
 
-int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
+static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 {
 	u64 quota, period;
 
@@ -6614,7 +6614,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_quota(struct task_group *tg)
+static long tg_get_cfs_quota(struct task_group *tg)
 {
 	u64 quota_us;
 
@@ -6627,7 +6627,7 @@ long tg_get_cfs_quota(struct task_group *tg)
 	return quota_us;
 }
 
-int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
+static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 {
 	u64 quota, period;
 
@@ -6637,7 +6637,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_period(struct task_group *tg)
+static long tg_get_cfs_period(struct task_group *tg)
 {
 	u64 cfs_period_us;
 
-- 
2.7.4



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

* Re: [PATCH v2 -next] sched/core: Make some functions static
  2019-04-18 13:29 ` [PATCH v2 -next] " Yue Haibing
@ 2019-04-18 13:40   ` Ingo Molnar
  2019-04-18 14:26     ` YueHaibing
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2019-04-18 13:40 UTC (permalink / raw)
  To: Yue Haibing; +Cc: mingo, peterz, linux-kernel


* Yue Haibing <yuehaibing@huawei.com> wrote:

> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fix sparse warnings:
> 
> kernel/sched/core.c:6524:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
> kernel/sched/core.c:6604:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
> kernel/sched/core.c:6617:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
> kernel/sched/core.c:6630:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
> kernel/sched/core.c:6640:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Could you please also use the updated commit message I edited for v1, 
instead of just reverting to the old one?

Thanks,

	Ingo

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

* Re: [PATCH v2 -next] sched/core: Make some functions static
  2019-04-18 13:40   ` Ingo Molnar
@ 2019-04-18 14:26     ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2019-04-18 14:26 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: mingo, peterz, linux-kernel

On 2019/4/18 21:40, Ingo Molnar wrote:
> 
> * Yue Haibing <yuehaibing@huawei.com> wrote:
> 
>> From: YueHaibing <yuehaibing@huawei.com>
>>
>> Fix sparse warnings:
>>
>> kernel/sched/core.c:6524:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
>> kernel/sched/core.c:6604:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
>> kernel/sched/core.c:6617:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
>> kernel/sched/core.c:6630:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
>> kernel/sched/core.c:6640:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Could you please also use the updated commit message I edited for v1, 
> instead of just reverting to the old one?

Sorry, I do not notice that, fix it now.

> 
> Thanks,
> 
> 	Ingo
> 
> 


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

* [PATCH v3 -next] sched/core: Make some functions static
  2019-03-22 14:31 [PATCH -next] sched/core: Make some functions static Yue Haibing
  2019-04-18 12:25 ` [tip:sched/core] " tip-bot for YueHaibing
  2019-04-18 13:29 ` [PATCH v2 -next] " Yue Haibing
@ 2019-04-18 14:47 ` Yue Haibing
  2019-04-18 18:31   ` [tip:sched/core] " tip-bot for YueHaibing
  2 siblings, 1 reply; 9+ messages in thread
From: Yue Haibing @ 2019-04-18 14:47 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, YueHaibing, Linus Torvalds, Thomas Gleixner

From: YueHaibing <yuehaibing@huawei.com>

Fix these sparse warnings:

  kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
  kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
  kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
  kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20190322143153.14416-1-yuehaibing@huawei.com
---
v2: do not make max_cfs_quota_period static, which has be used in kernel/sched/fair.c
v3: fix commit log
---
 kernel/sched/core.c | 10 +++++-----
 kernel/sched/fair.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f9e9117..226d68c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6521,7 +6521,7 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
 static DEFINE_MUTEX(cfs_constraints_mutex);
 
 const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
-const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
+static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
 
 static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 
@@ -6601,7 +6601,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
 	return ret;
 }
 
-int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
+static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 {
 	u64 quota, period;
 
@@ -6614,7 +6614,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_quota(struct task_group *tg)
+static long tg_get_cfs_quota(struct task_group *tg)
 {
 	u64 quota_us;
 
@@ -6627,7 +6627,7 @@ long tg_get_cfs_quota(struct task_group *tg)
 	return quota_us;
 }
 
-int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
+static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 {
 	u64 quota, period;
 
@@ -6637,7 +6637,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_period(struct task_group *tg)
+static long tg_get_cfs_period(struct task_group *tg)
 {
 	u64 cfs_period_us;
 
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 99731a5..4275eb0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2593,7 +2593,7 @@ void task_numa_work(struct callback_head *work)
 /*
  * Drive the periodic memory faults..
  */
-void task_tick_numa(struct rq *rq, struct task_struct *curr)
+static void task_tick_numa(struct rq *rq, struct task_struct *curr)
 {
 	struct callback_head *work = &curr->numa_work;
 	u64 period, now;
-- 
2.7.4



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

* [tip:sched/core] sched/core: Make some functions static
  2019-04-18 14:47 ` [PATCH v3 " Yue Haibing
@ 2019-04-18 18:31   ` tip-bot for YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for YueHaibing @ 2019-04-18 18:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, tglx, peterz, linux-kernel, hpa, yuehaibing, torvalds

Commit-ID:  b1546edcf2aab710a5afc98d65c948a4bfac0353
Gitweb:     https://git.kernel.org/tip/b1546edcf2aab710a5afc98d65c948a4bfac0353
Author:     YueHaibing <yuehaibing@huawei.com>
AuthorDate: Thu, 18 Apr 2019 22:47:13 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 18 Apr 2019 20:28:02 +0200

sched/core: Make some functions static

Fix these sparse warnings:

  kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static?
  kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static?
  kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static?
  kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static?
  kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20190418144713.34332-1-yuehaibing@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 10 +++++-----
 kernel/sched/fair.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f4838b78b9f9..8b64ef0d5589 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6522,7 +6522,7 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
 static DEFINE_MUTEX(cfs_constraints_mutex);
 
 const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
-const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
+static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
 
 static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 
@@ -6602,7 +6602,7 @@ out_unlock:
 	return ret;
 }
 
-int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
+static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 {
 	u64 quota, period;
 
@@ -6615,7 +6615,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_quota(struct task_group *tg)
+static long tg_get_cfs_quota(struct task_group *tg)
 {
 	u64 quota_us;
 
@@ -6628,7 +6628,7 @@ long tg_get_cfs_quota(struct task_group *tg)
 	return quota_us;
 }
 
-int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
+static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 {
 	u64 quota, period;
 
@@ -6638,7 +6638,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
 	return tg_set_cfs_bandwidth(tg, period, quota);
 }
 
-long tg_get_cfs_period(struct task_group *tg)
+static long tg_get_cfs_period(struct task_group *tg)
 {
 	u64 cfs_period_us;
 
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e5b100b6ba4e..13bafe350abf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2593,7 +2593,7 @@ out:
 /*
  * Drive the periodic memory faults..
  */
-void task_tick_numa(struct rq *rq, struct task_struct *curr)
+static void task_tick_numa(struct rq *rq, struct task_struct *curr)
 {
 	struct callback_head *work = &curr->numa_work;
 	u64 period, now;

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

end of thread, other threads:[~2019-04-18 18:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 14:31 [PATCH -next] sched/core: Make some functions static Yue Haibing
2019-04-18 12:25 ` [tip:sched/core] " tip-bot for YueHaibing
2019-04-18 12:48   ` Ingo Molnar
2019-04-18 13:17     ` YueHaibing
2019-04-18 13:29 ` [PATCH v2 -next] " Yue Haibing
2019-04-18 13:40   ` Ingo Molnar
2019-04-18 14:26     ` YueHaibing
2019-04-18 14:47 ` [PATCH v3 " Yue Haibing
2019-04-18 18:31   ` [tip:sched/core] " tip-bot for YueHaibing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.