* [PATCH] sched: loadavg: delete useless param ticks for calc_global_load
@ 2020-07-28 8:58 Wang Wenhu
2020-07-28 9:28 ` Dietmar Eggemann
0 siblings, 1 reply; 2+ messages in thread
From: Wang Wenhu @ 2020-07-28 8:58 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
John Stultz, Thomas Gleixner, Stephen Boyd, Wang Wenhu,
linux-kernel
The only parameter "unsigned long ticks" for calc_global_load is
never used inside the function definition. Delete it now.
Signed-off-by: Wang Wenhu <wenhu.wang@vivo.com>
---
include/linux/sched/loadavg.h | 2 +-
kernel/sched/loadavg.c | 2 +-
kernel/time/timekeeping.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/sched/loadavg.h b/include/linux/sched/loadavg.h
index 4859bea47a7b..83ec54b65e79 100644
--- a/include/linux/sched/loadavg.h
+++ b/include/linux/sched/loadavg.h
@@ -43,6 +43,6 @@ extern unsigned long calc_load_n(unsigned long load, unsigned long exp,
#define LOAD_INT(x) ((x) >> FSHIFT)
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
-extern void calc_global_load(unsigned long ticks);
+extern void calc_global_load(void);
#endif /* _LINUX_SCHED_LOADAVG_H */
diff --git a/kernel/sched/loadavg.c b/kernel/sched/loadavg.c
index de22da666ac7..d2a655643a02 100644
--- a/kernel/sched/loadavg.c
+++ b/kernel/sched/loadavg.c
@@ -347,7 +347,7 @@ static inline void calc_global_nohz(void) { }
*
* Called from the global timer code.
*/
-void calc_global_load(unsigned long ticks)
+void calc_global_load(void)
{
unsigned long sample_window;
long active, delta;
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index d20d489841c8..63a632f9896c 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -2193,7 +2193,7 @@ EXPORT_SYMBOL(ktime_get_coarse_ts64);
void do_timer(unsigned long ticks)
{
jiffies_64 += ticks;
- calc_global_load(ticks);
+ calc_global_load();
}
/**
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: loadavg: delete useless param ticks for calc_global_load
2020-07-28 8:58 [PATCH] sched: loadavg: delete useless param ticks for calc_global_load Wang Wenhu
@ 2020-07-28 9:28 ` Dietmar Eggemann
0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Eggemann @ 2020-07-28 9:28 UTC (permalink / raw)
To: Wang Wenhu, Ingo Molnar, Peter Zijlstra, Juri Lelli,
Vincent Guittot, Steven Rostedt, Ben Segall, Mel Gorman,
John Stultz, Thomas Gleixner, Stephen Boyd, linux-kernel
On 28/07/2020 10:58, Wang Wenhu wrote:
> The only parameter "unsigned long ticks" for calc_global_load is
> never used inside the function definition. Delete it now.
>
> Signed-off-by: Wang Wenhu <wenhu.wang@vivo.com>
> ---
> include/linux/sched/loadavg.h | 2 +-
> kernel/sched/loadavg.c | 2 +-
> kernel/time/timekeeping.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/sched/loadavg.h b/include/linux/sched/loadavg.h
> index 4859bea47a7b..83ec54b65e79 100644
> --- a/include/linux/sched/loadavg.h
> +++ b/include/linux/sched/loadavg.h
> @@ -43,6 +43,6 @@ extern unsigned long calc_load_n(unsigned long load, unsigned long exp,
> #define LOAD_INT(x) ((x) >> FSHIFT)
> #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
>
> -extern void calc_global_load(unsigned long ticks);
> +extern void calc_global_load(void);
>
> #endif /* _LINUX_SCHED_LOADAVG_H */
> diff --git a/kernel/sched/loadavg.c b/kernel/sched/loadavg.c
> index de22da666ac7..d2a655643a02 100644
> --- a/kernel/sched/loadavg.c
> +++ b/kernel/sched/loadavg.c
> @@ -347,7 +347,7 @@ static inline void calc_global_nohz(void) { }
> *
> * Called from the global timer code.
> */
> -void calc_global_load(unsigned long ticks)
> +void calc_global_load(void)
> {
> unsigned long sample_window;
> long active, delta;
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index d20d489841c8..63a632f9896c 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -2193,7 +2193,7 @@ EXPORT_SYMBOL(ktime_get_coarse_ts64);
> void do_timer(unsigned long ticks)
> {
> jiffies_64 += ticks;
> - calc_global_load(ticks);
> + calc_global_load();
> }
>
> /**
There is already commit 46132e3ac58c ("sched: nohz: stop passing around
unused "ticks" parameter.") in linux-next master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-28 9:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 8:58 [PATCH] sched: loadavg: delete useless param ticks for calc_global_load Wang Wenhu
2020-07-28 9:28 ` Dietmar Eggemann
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).