* [PATCH] sched/deadline: Fix lint warnings and errors in deadline.c
@ 2024-08-07 6:58 Juan José Arboleda
0 siblings, 0 replies; only message in thread
From: Juan José Arboleda @ 2024-08-07 6:58 UTC (permalink / raw)
To: mingo, vincent.guittot, dietmar.eggemann, mgorman; +Cc: linux-kernel
- Remove unnecessary 'else' statement following a 'return'
- Correct code indentation to use tabs instead of spaces
This change addresses the following checkpatch warnings and errors:
- WARNING: else is not generally useful after a break or return
- ERROR: code indent should use tabs where possible
- WARNING: please, no spaces at the start of a line
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
---
kernel/sched/deadline.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index f59e5c19d944..5b945a64d00f 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -158,12 +158,12 @@ static inline unsigned long dl_bw_capacity(int i)
if (!sched_asym_cpucap_active() &&
arch_scale_cpu_capacity(i) == SCHED_CAPACITY_SCALE) {
return dl_bw_cpus(i) << SCHED_CAPACITY_SHIFT;
- } else {
- RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held(),
- "sched RCU must be held");
-
- return __dl_bw_capacity(cpu_rq(i)->rd->span);
}
+
+ RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held(),
+ "sched RCU must be held");
+
+ return __dl_bw_capacity(cpu_rq(i)->rd->span);
}
static inline bool dl_bw_visited(int cpu, u64 gen)
@@ -1321,7 +1321,7 @@ static u64 grub_reclaim(u64 delta, struct rq *rq, struct sched_dl_entity *dl_se)
static inline void
update_stats_dequeue_dl(struct dl_rq *dl_rq, struct sched_dl_entity *dl_se,
- int flags);
+ int flags);
static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64 delta_exec)
{
s64 scaled_delta_exec;
--
2.45.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-07 6:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 6:58 [PATCH] sched/deadline: Fix lint warnings and errors in deadline.c Juan José Arboleda
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.