sched: add the inline keyword to the prototype.
PATCH 1/1 sched: add the inline keyword to the prototype.
The prototype has to agree with the definition.
Add the inline keyword to the prototype also
--- kernel/sched_fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched_fair.c +2 -2
@@ -306,7 +306,7 @@ find_matching_se(struct sched_entity **se, struct sched_entity **pse)#endif /* CONFIG_FAIR_GROUP_SCHED */ -static void account_cfs_rq_runtime (struct cfs_rq *cfs_rq, +static __always_inline void account_cfs_rq_runtime(struct cfs_rq *cfs_rq,unsigned long delta_exec);/**************************************************************
@@ -1052,7 +1052,7 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se)__clear_buddies_skip (se); } -static void return_cfs_rq_runtime (struct cfs_rq *cfs_rq); +static __always_inline void return_cfs_rq_runtime(struct cfs_rq *cfs_rq);static void dequeue_entity (struct cfs_rq *cfs_rq,struct sched_entity *se,int flags)
Signature · 1 line
1.7.4.1
Quoted 3 lines · Il Han
The prototype has to agree with the definition.
Add the inline keyword to the prototype also
Hmm... this would then cause the prototypes to disagree in the !CONFIG_CFS_BANDWIDTH case.
Can you update?
Quoted 27 lines
Signed-off-by Il Han<[email protected]>--- kernel/sched_fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/sched_fair.c +2
-2@@ -306,7 +306,7 @@ find_matching_se(struct sched_entity **se, struct sched_entity **pse)#endif /* CONFIG_FAIR_GROUP_SCHED */ -static void account_cfs_rq_runtime (struct cfs_rq *cfs_rq, +static __always_inline void account_cfs_rq_runtime(struct cfs_rq *cfs_rq,unsigned long delta_exec);/************************************************************** @@ -1052,7 +1052,7 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se)__clear_buddies_skip (se); } -static void return_cfs_rq_runtime (struct cfs_rq *cfs_rq); +static __always_inline void return_cfs_rq_runtime(struct cfs_rq *cfs_rq);static void dequeue_entity (struct cfs_rq *cfs_rq,struct sched_entity *se,int flags)
Quoted 7 lines · Paul Turner
Quoted 3 lines · Il Han
The prototype has to agree with the definition.
Add the inline keyword to the prototype alsoHmm... this would then cause the prototypes to disagree in the !CONFIG_CFS_BANDWIDTH case.
I'm very sure I've compiled a lot of kernels yesterday with various permutations including FAIR_GROUP && !CFS_BANDWIDTH and I'm also very sure I haven't actually seen any complaints like this.
It this some new fangled GCC 'feature'? I'm currently still on 4.5 which admittedly is somewhat stale.
Quoted 9 lines · Peter Zijlstra
Quoted 7 lines · Paul Turner
Quoted 3 lines · Il Han
The prototype has to agree with the definition.
Add the inline keyword to the prototype alsoHmm... this would then cause the prototypes to disagree in the !CONFIG_CFS_BANDWIDTH case.
Quoted 6 lines
I'm very sure I've compiled a lot of kernels yesterday with various permutations including FAIR_GROUP&& !CFS_BANDWIDTH and I'm also very sure I haven't actually seen any complaints like this.
It this some new fangled GCC 'feature'? I'm currently still on 4.5 which admittedly is somewhat stale.
gcc (even 4.6) won't give warnings either way about the inline attribute on a forward declaration not matching in either direction. I would imagine this was found by code-inspection.
I was only pointing out with this we have:
#if CONFIG_CFS_BANDWIDTH
static __always_inline xxx() { stuff; } [1]
#else
static xxx() {} [2]
#endif
And that by only changing the pre-declaration to match [1] it now similarly (silently) would not match [2] in the !CONFIG case.
- Paul