mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: core: remove unnecessary ‘0’ values from ret
@ 2023-04-25 20:29 Li zeming
  0 siblings, 0 replies; 2+ messages in thread
From: Li zeming @ 2023-04-25 20:29 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Li zeming

ret is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 6c2b6b797d93..3249c1272e57 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -10687,7 +10687,7 @@ static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota,
 				u64 burst)
 {
-	int i, ret = 0, runtime_enabled, runtime_was_enabled;
+	int i, ret, runtime_enabled, runtime_was_enabled;
 	struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
 
 	if (tg == &root_task_group)
-- 
2.18.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] sched: core: Remove unnecessary ‘0’ values from ret
@ 2024-05-28  7:36 Li zeming
  0 siblings, 0 replies; 2+ messages in thread
From: Li zeming @ 2024-05-28  7:36 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Li zeming

ret is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 346159a24705..140e6373fce2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -10808,7 +10808,7 @@ static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
 static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota,
 				u64 burst)
 {
-	int i, ret = 0, runtime_enabled, runtime_was_enabled;
+	int i, ret, runtime_enabled, runtime_was_enabled;
 	struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
 
 	if (tg == &root_task_group)
-- 
2.18.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-28  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 20:29 [PATCH] sched: core: remove unnecessary ‘0’ values from ret Li zeming
2024-05-28  7:36 [PATCH] sched: core: Remove " Li zeming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®