Skip to contentSkip to conversation

sched/deadline: Fix lint warnings and errors in deadline.c

PATCH New Juan José Arboleda 1 participant 1 message Aug 7, 2024 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/deadline: Fix lint warnings and errors in deadline.c

- 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

---
 kernel/sched/deadline.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
kernel/sched/deadline.c +6 -6
index f59e5c19d944..5b945a64d00f 100644
@@ -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;
Signature · 1 line
2.45.2