public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Please fix warning of Exynos
@ 2014-07-30  9:59 Masahiro Yamada
  2014-07-30 11:35 ` Jaehoon Chung
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2014-07-30  9:59 UTC (permalink / raw)
  To: u-boot

Hi, Samsung developers,


I notice the following warning when building Exynos family:



arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
  struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
                                               ^
arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
  struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
                                               ^
arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]




I think the cause is that
PERIPH_ID_PWM0 is defined as 132, but clk_bit_info
has much smaller array size.




You can repeat this with this toolchain:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz




Best Regards
Masahiro Yamada

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

* [U-Boot] Please fix warning of Exynos
  2014-07-30  9:59 [U-Boot] Please fix warning of Exynos Masahiro Yamada
@ 2014-07-30 11:35 ` Jaehoon Chung
  0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2014-07-30 11:35 UTC (permalink / raw)
  To: u-boot

Hi, Masahiro.

Thanks for pointing out.
I will check it.

Best Regards,
Jaehoon Chung

On 07/30/2014 06:59 PM, Masahiro Yamada wrote:
> Hi, Samsung developers,
> 
> 
> I notice the following warning when building Exynos family:
> 
> 
> 
> arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
> arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
>   struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
>                                                ^
> arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
> arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
> arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
>   struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
>                                                ^
> arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
> 
> 
> 
> 
> I think the cause is that
> PERIPH_ID_PWM0 is defined as 132, but clk_bit_info
> has much smaller array size.
> 
> 
> 
> 
> You can repeat this with this toolchain:
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz
> 
> 
> 
> 
> Best Regards
> Masahiro Yamada
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

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

end of thread, other threads:[~2014-07-30 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30  9:59 [U-Boot] Please fix warning of Exynos Masahiro Yamada
2014-07-30 11:35 ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox