All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s
@ 2015-09-10  0:38 Alexey Klimov
  2015-09-10  0:38 ` [PATCH 2/3] clocksource: sh_cmt: remove unneeded memset() in sh_cmt_setup() Alexey Klimov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexey Klimov @ 2015-09-10  0:38 UTC (permalink / raw)
  To: linux-kernel, daniel.lezcano
  Cc: tglx, klimov.linux, ysato, uclinux-h8-devel, yury.norov,
	Alexey Klimov

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


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

end of thread, other threads:[~2015-09-15  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10  0:38 [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s Alexey Klimov
2015-09-10  0:38 ` [PATCH 2/3] clocksource: sh_cmt: remove unneeded memset() in sh_cmt_setup() Alexey Klimov
2015-09-10  0:38 ` [PATCH 3/3] clocksource: h8300_*: remove unneeded memset()s Alexey Klimov
2015-09-15  8:48 ` [PATCH 1/3] clocksource: em_sti: " Daniel Lezcano

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.