* [PATCH] sched: topology: Remove unnecessary ‘0’ values from nr_levels
@ 2023-10-17 6:20 Li kunyu
2023-10-18 12:15 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2023-10-17 6:20 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, bristot, vschneid
Cc: linux-kernel, Li kunyu
nr_levels is assigned first, so it does not need to initialize the
assignment.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
kernel/sched/topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 05a5bc678c089..0ead4e72bc6ca 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1823,7 +1823,7 @@ void sched_init_numa(int offline_node)
{
struct sched_domain_topology_level *tl;
unsigned long *distance_map;
- int nr_levels = 0;
+ int nr_levels;
int i, j;
int *distances;
struct cpumask ***masks;
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: topology: Remove unnecessary ‘0’ values from nr_levels
2023-10-17 6:20 [PATCH] sched: topology: Remove unnecessary ‘0’ values from nr_levels Li kunyu
@ 2023-10-18 12:15 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2023-10-18 12:15 UTC (permalink / raw)
To: Li kunyu
Cc: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, bristot, vschneid, linux-kernel
* Li kunyu <kunyu@nfschina.com> wrote:
> nr_levels is assigned first, so it does not need to initialize the
> assignment.
In C there's no such thing as "initializing the assignment"...
Please write sensible changelogs that demonstrate an understanding of these
principles.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-18 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17 6:20 [PATCH] sched: topology: Remove unnecessary ‘0’ values from nr_levels Li kunyu
2023-10-18 12:15 ` Ingo Molnar
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.