projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arch/powerpc: Simplify some calculations using ARRAY_SIZE() macro.
[platform/kernel/u-boot.git]
/
arch
/
powerpc
/
cpu
/
mpc83xx
/
speed.c
diff --git
a/arch/powerpc/cpu/mpc83xx/speed.c
b/arch/powerpc/cpu/mpc83xx/speed.c
index
2e91f51
..
5498c19
100644
(file)
--- a/
arch/powerpc/cpu/mpc83xx/speed.c
+++ b/
arch/powerpc/cpu/mpc83xx/speed.c
@@
-412,7
+412,7
@@
int get_clocks(void)
#endif
corecnf_tab_index = ((corepll & 0x1F) << 2) | ((corepll & 0x60) >> 5);
#endif
corecnf_tab_index = ((corepll & 0x1F) << 2) | ((corepll & 0x60) >> 5);
- if (corecnf_tab_index > (
sizeof(corecnf_tab) / sizeof(corecnf_t
))) {
+ if (corecnf_tab_index > (
ARRAY_SIZE(corecnf_tab
))) {
/* corecnf_tab_index is too high, possibly wrong value */
return -11;
}
/* corecnf_tab_index is too high, possibly wrong value */
return -11;
}