Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221820 > unrolled thread
| Started by | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| First post | 2015-09-10 02:40 +0200 |
| Last post | 2015-09-15 10:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[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
| From | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| Date | 2015-09-10 02:40 +0200 |
| Subject | [PATCH 1/3] clocksource: em_sti: remove unneeded memset()s |
| Message-ID | <q6Y4a-2nB-5@gated-at.bofh.it> |
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/
[toc] | [next] | [standalone]
| From | Alexey Klimov <alexey.klimov@linaro.org> |
|---|---|
| Date | 2015-09-10 02:40 +0200 |
| Subject | [PATCH 3/3] clocksource: h8300_*: remove unneeded memset()s |
| Message-ID | <q6Y4a-2nB-13@gated-at.bofh.it> |
| In reply to | #1221820 |
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
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-09-15 10:50 +0200 |
| Message-ID | <q8U66-86T-7@gated-at.bofh.it> |
| In reply to | #1221820 |
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 -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web