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


Groups > linux.kernel > #1221820

[PATCH 1/3] clocksource: em_sti: remove unneeded memset()s

From Alexey Klimov <alexey.klimov@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s
Date 2015-09-10 02:40 +0200
Message-ID <q6Y4a-2nB-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Memory for cs and ced fields in struct em_sti_priv is allocated
by devm_kzalloc() in the beginning of em_sti_probe() so they
don't need to be zeroed one more time in
em_sti_register_clocksource() and in em_sti_register_clockevent().

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 drivers/clocksource/em_sti.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c
index 7a97a34..19bb179 100644
--- a/drivers/clocksource/em_sti.c
+++ b/drivers/clocksource/em_sti.c
@@ -228,7 +228,6 @@ static int em_sti_register_clocksource(struct em_sti_priv *p)
 {
 	struct clocksource *cs = &p->cs;
 
-	memset(cs, 0, sizeof(*cs));
 	cs->name = dev_name(&p->pdev->dev);
 	cs->rating = 200;
 	cs->read = em_sti_clocksource_read;
@@ -285,7 +284,6 @@ static void em_sti_register_clockevent(struct em_sti_priv *p)
 {
 	struct clock_event_device *ced = &p->ced;
 
-	memset(ced, 0, sizeof(*ced));
 	ced->name = dev_name(&p->pdev->dev);
 	ced->features = CLOCK_EVT_FEAT_ONESHOT;
 	ced->rating = 200;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] clocksource: em_sti: remove unneeded memset()s Alexey Klimov <alexey.klimov@linaro.org> - 2015-09-10 02:40 +0200
  [PATCH 3/3] clocksource: h8300_*: remove unneeded memset()s Alexey Klimov <alexey.klimov@linaro.org> - 2015-09-10 02:40 +0200
  Re: [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-09-15 10:50 +0200

csiph-web