sh: sh4a: Remove unused tmu3_device
PATCH 1/1 sh: sh4a: Remove unused tmu3_device
Remove left-over from previous cleanups to silence the warning:
arch/sh/kernel/cpu/sh4a/setup-sh7786.c:243:31:
warning: ‘tmu3_device’ defined but not used [-Wunused-variable]
--- arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 21 --------------------- 1 file changed, 21 deletions(-)
arch/sh/kernel/cpu/sh4a/setup-sh7786.c +0 -21
@@ -229,27 +229,6 @@ static struct platform_device tmu2_device = { .num_resources = ARRAY_SIZE(tmu2_resources), }; -static struct sh_timer_config tmu3_platform_data = { - .channels_mask =7 , -}; - -static struct resource tmu3_resources[] = { -DEFINE_RES_MEM (0xffde0000 ,0x2c ), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -}; - -static struct platform_device tmu3_device = { - .name ="sh-tmu" , - .id =3 , - .dev = { - .platform_data = &tmu3_platform_data, - }, - .resource = tmu3_resources, - .num_resources =ARRAY_SIZE (tmu3_resources), -}; -static const struct sh_dmae_channel dmac0_channels[] = { { .offset =0 ,
Signature · 1 line
2.17.1
Hi Krzysztof,
Quoted 32 lines · Krzysztof Kozlowski
Remove left-over from previous cleanups to silence the warning:
arch/sh/kernel/cpu/sh4a/setup-sh7786.c:243:31:
warning: ‘tmu3_device’ defined but not used [-Wunused-variable]Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 21 --------------------- 1 file changed, 21 deletions(-)arch/sh/kernel/cpu/sh4a/setup-sh7786.c +0
-14@@ -229,27 +229,6 @@ static struct platform_device tmu2_device = { .num_resources = ARRAY_SIZE(tmu2_resources), }; -static struct sh_timer_config tmu3_platform_data = { - .channels_mask =7 , -}; - -static struct resource tmu3_resources[] = { -DEFINE_RES_MEM (0xffde0000 ,0x2c ), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -}; - -static struct platform_device tmu3_device = { - .name ="sh-tmu" , - .id =3 ,
arch/sh/kernel/cpu/sh4a/setup-sh7786.c static struct platform_device tmu2_device = { · line 234
Quoted 10 lines
arch/sh/kernel/cpu/sh4a/setup-sh7786.c +0
-7- .dev = { - .platform_data = &tmu3_platform_data, - }, - .resource = tmu3_resources, - .num_resources = ARRAY_SIZE(tmu3_resources), -}; -static const struct sh_dmae_channel dmac0_channels[] = { { .offset =0 ,
Looks like the previous cleanup accidentally removed one too many tmu device pointers. The old style used one device per timer, the new style uses one device per 3 timers, i.e. 4 devices for 12 timers.
So the correct fix would be to re-add "&tmu3_device" to sh7786_early_devices[].
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 50 lines · Geert Uytterhoeven
Hi Krzysztof,
Quoted 32 lines · Krzysztof Kozlowski
Remove left-over from previous cleanups to silence the warning:
arch/sh/kernel/cpu/sh4a/setup-sh7786.c:243:31:
warning: ‘tmu3_device’ defined but not used [-Wunused-variable]Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 21 --------------------- 1 file changed, 21 deletions(-)arch/sh/kernel/cpu/sh4a/setup-sh7786.c +0
-14@@ -229,27 +229,6 @@ static struct platform_device tmu2_device = { .num_resources = ARRAY_SIZE(tmu2_resources), }; -static struct sh_timer_config tmu3_platform_data = { - .channels_mask =7 , -}; - -static struct resource tmu3_resources[] = { -DEFINE_RES_MEM (0xffde0000 ,0x2c ), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -DEFINE_RES_IRQ (evt2irq (0x7c0 )), -}; - -static struct platform_device tmu3_device = { - .name ="sh-tmu" , - .id =3 ,arch/sh/kernel/cpu/sh4a/setup-sh7786.c static struct platform_device tmu2_device = { · line 234
Quoted 10 lines
arch/sh/kernel/cpu/sh4a/setup-sh7786.c +0
-7- .dev = { - .platform_data = &tmu3_platform_data, - }, - .resource = tmu3_resources, - .num_resources = ARRAY_SIZE(tmu3_resources), -}; -static const struct sh_dmae_channel dmac0_channels[] = { { .offset =0 ,Looks like the previous cleanup accidentally removed one too many tmu device pointers. The old style used one device per timer, the new style uses one device per 3 timers, i.e. 4 devices for 12 timers.
Quoted 4 lines
So the correct fix would be to re-add "
&tmu3_device" to sh7786_early_devices[].Fixes 1399c195ef5009bf ("sh: Switch to new style TMU device")
Indeed, thanks. I'll send v2.
Best regards,
Krzysztof