public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Juan José Arboleda" <soyjuanarbol@gmail.com>
To: mingo@redhat.com, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, mgorman@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched/deadline: Fix lint warnings and errors in deadline.c
Date: Wed, 7 Aug 2024 01:58:54 -0500	[thread overview]
Message-ID: <ZrMbLlaFaQ55hO_a@fedora> (raw)

- 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


                 reply	other threads:[~2024-08-07  6:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZrMbLlaFaQ55hO_a@fedora \
    --to=soyjuanarbol@gmail.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox