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

* [PATCH 2/3] clocksource: sh_cmt: remove unneeded memset() in sh_cmt_setup()
  2015-09-10  0:38 [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s Alexey Klimov
@ 2015-09-10  0:38 ` 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
  2 siblings, 0 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 cmt struct is allocated by kzalloc() in sh_cmt_setup.

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

diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index ba73a6e..103c493 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -962,7 +962,6 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
 	unsigned int i;
 	int ret;
 
-	memset(cmt, 0, sizeof(*cmt));
 	cmt->pdev = pdev;
 	raw_spin_lock_init(&cmt->lock);
 
-- 
2.1.4


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

* [PATCH 3/3] clocksource: h8300_*: remove unneeded memset()s
  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 ` Alexey Klimov
  2015-09-15  8:48 ` [PATCH 1/3] clocksource: em_sti: " Daniel Lezcano
  2 siblings, 0 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 timer16_priv, timer8_priv and tpu_priv structs is
allocated by devm_kzalloc() in corresponding probe functions
of drivers.
No need to zero it one more time.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 drivers/clocksource/h8300_timer16.c | 1 -
 drivers/clocksource/h8300_timer8.c  | 1 -
 drivers/clocksource/h8300_tpu.c     | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index 82941c1..0e076c6 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -153,7 +153,6 @@ static int timer16_setup(struct timer16_priv *p, struct platform_device *pdev)
 	int ret, irq;
 	unsigned int ch;
 
-	memset(p, 0, sizeof(*p));
 	p->pdev = pdev;
 
 	res[REG_CH] = platform_get_resource(p->pdev,
diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c
index f9b3b70..44375d8 100644
--- a/drivers/clocksource/h8300_timer8.c
+++ b/drivers/clocksource/h8300_timer8.c
@@ -215,7 +215,6 @@ static int timer8_setup(struct timer8_priv *p,
 	int irq;
 	int ret;
 
-	memset(p, 0, sizeof(*p));
 	p->pdev = pdev;
 
 	res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
diff --git a/drivers/clocksource/h8300_tpu.c b/drivers/clocksource/h8300_tpu.c
index 64195fd..5487410 100644
--- a/drivers/clocksource/h8300_tpu.c
+++ b/drivers/clocksource/h8300_tpu.c
@@ -123,7 +123,6 @@ static int __init tpu_setup(struct tpu_priv *p, struct platform_device *pdev)
 {
 	struct resource *res[2];
 
-	memset(p, 0, sizeof(*p));
 	p->pdev = pdev;
 
 	res[CH_L] = platform_get_resource(p->pdev, IORESOURCE_MEM, CH_L);
-- 
2.1.4


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

* Re: [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s
  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 ` Daniel Lezcano
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2015-09-15  8:48 UTC (permalink / raw)
  To: Alexey Klimov, linux-kernel
  Cc: tglx, klimov.linux, ysato, uclinux-h8-devel, yury.norov

On 09/10/2015 02:38 AM, Alexey Klimov wrote:
> 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>
> ---

All patches of the series applied for 4.4

Thanks !

   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[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.