Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607383

[PATCH 2/4] sched: cpudeadline: don't re-initialize struct cpudl

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 2/4] sched: cpudeadline: don't re-initialize struct cpudl
Date 2017-03-23 12:40 +0100
Message-ID <to9fY-1zG-9@gated-at.bofh.it> (permalink)
References <to9fY-1zG-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The struct cpudl passed to cpudl_init() is already initialized to zero.
Don't do that again.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/sched/cpudeadline.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index fba235c7d026..a51e91bf3907 100644
--- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c
@@ -246,9 +246,7 @@ int cpudl_init(struct cpudl *cp)
 {
 	int i;
 
-	memset(cp, 0, sizeof(*cp));
 	raw_spin_lock_init(&cp->lock);
-	cp->size = 0;
 
 	cp->elements = kcalloc(nr_cpu_ids,
 			       sizeof(struct cpudl_item),
-- 
2.12.0.432.g71c3a4f4ba37

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 2/4] sched: cpudeadline: don't re-initialize struct cpudl Viresh Kumar <viresh.kumar@linaro.org> - 2017-03-23 12:40 +0100

csiph-web