summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2014-11-06 14:02:57 +0100
committerTom Rini <trini@ti.com>2014-11-07 16:27:07 -0500
commit0060517ae087eed94c64c175e5042b16e0a415fa (patch)
tree827e188eba7feb81d53025aff9a72b5c355bf170 /arch/powerpc/cpu
parentadbba99606a06df1435de6f1866c0e7996412e27 (diff)
downloadu-boot-imx-0060517ae087eed94c64c175e5042b16e0a415fa.zip
u-boot-imx-0060517ae087eed94c64c175e5042b16e0a415fa.tar.gz
u-boot-imx-0060517ae087eed94c64c175e5042b16e0a415fa.tar.bz2
cppcheck cleanup: fix nullPointer errors
There are a number of places where U-Boot intentionally and legally accesses physical address 0x0000, for example when installing exception vectors on systems where these are located in low memory. Add "cppcheck-suppress nullPointer" comments to silence cppcheck where this is intentional and legal. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init_early.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
index 47b712d..072387a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
@@ -161,9 +161,12 @@ void cpu_init_early_f(void *fdt)
setup_ifc_sram = (void *)SRAM_BASE_ADDR;
dst = (u32 *) SRAM_BASE_ADDR;
src = (u32 *) setup_ifc;
- for (i = 0; i < 1024; i++)
+ for (i = 0; i < 1024; i++) {
+ /* cppcheck-suppress nullPointer */
*dst++ = *src++;
+ }
+ /* cppcheck-suppress nullPointer */
setup_ifc_sram();
/* CLEANUP */