lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZrMbLlaFaQ55hO_a@fedora>
Date: Wed, 7 Aug 2024 01:58:54 -0500
From: Juan José Arboleda <soyjuanarbol@...il.com>
To: mingo@...hat.com, vincent.guittot@...aro.org, dietmar.eggemann@....com,
	mgorman@...e.de
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] 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

Signed-off-by: Juan José Arboleda <soyjuanarbol@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ