From: Joonyoung Shim <jy0922.shim@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Question about compile warnings of exynos clock
Date: Tue, 13 Jan 2015 11:24:16 +0900 [thread overview]
Message-ID: <54B481D0.2070508@samsung.com> (raw)
Hi,
I found below compile warnings,
CC arch/arm/cpu/armv7/exynos/clock.o
arch/arm/cpu/armv7/exynos/clock.c: In function ?clock_get_periph_rate?:
arch/arm/cpu/armv7/exynos/clock.c:265: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:265:47: warning: array subscript is above array bounds [-Warray-bounds]
...
> static unsigned long exynos5_get_periph_rate(int peripheral)
> {
> struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
>
This can access out of bounds of clk_bit_info[] array from
exynos5_get_periph_rate(). The peripheral value comes from
enum periph_id but it gets out of count clk_bit_info[] array.
So, i don't think exynos5_get_periph_rate is working correctly.
Currently, exynos5_get_periph_rate is used by clock_get_periph_rate only
from get_pwm_clk.
Is it ongoing to work for generic api to get the clk freq? If not,
let's remove exynos5_get_periph_rate and clock_get_periph_rate.
Thanks.
next reply other threads:[~2015-01-13 2:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 2:24 Joonyoung Shim [this message]
2015-01-13 2:27 ` [U-Boot] Question about compile warnings of exynos clock Simon Glass
2015-01-13 2:36 ` Joonyoung Shim
2015-01-13 2:47 ` Simon Glass
2015-01-13 2:51 ` Joonyoung Shim
2015-01-13 2:56 ` Simon Glass
2015-01-13 4:10 ` Jaehoon Chung
-- strict thread matches above, loose matches on Subject: below --
2015-01-13 5:40 Akshay Saraswat
2015-01-13 5:56 ` Joonyoung Shim
2015-01-13 5:58 ` Jaehoon Chung
2015-01-14 4:42 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B481D0.2070508@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.