]> git.sur5r.net Git - u-boot/commitdiff
powerpc/mpc83xx: sparse fixes
authorKim Phillips <kim.phillips@freescale.com>
Mon, 29 Oct 2012 13:34:39 +0000 (13:34 +0000)
committerTom Rini <trini@ti.com>
Sun, 4 Nov 2012 18:00:37 +0000 (11:00 -0700)
fdt.c:91:78: warning: Using plain integer as NULL pointer
fdt.c:103:78: warning: Using plain integer as NULL pointer
speed.c:55:11: warning: symbol 'corecnf_tab' was not declared. Should it be static?
speed.c:519:5: warning: symbol 'do_clocks' was not declared. Should it be static?
mpc8313erdb.c:73:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:74:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:75:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:76:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:79:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:80:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:81:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:82:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:85:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:86:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:87:17: warning: obsolete struct initializer, use C99 syntax
mpc8313erdb.c:88:17: warning: obsolete struct initializer, use C99 syntax

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
arch/powerpc/cpu/mpc83xx/fdt.c
arch/powerpc/cpu/mpc83xx/speed.c
board/freescale/mpc8313erdb/mpc8313erdb.c

index 028c8f0d584fd3861f3205ef9462dc5f31e87887..1f54781b7e2d3b7e8e1e58e1dce64b727b21e9ba 100644 (file)
@@ -88,7 +88,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
                                u32 tmp[] = { 32, 0x8, 33, 0x8, 34, 0x8 };
 
                                path = fdt_path_offset(blob, prop);
-                               prop = fdt_getprop(blob, path, "interrupts", 0);
+                               prop = fdt_getprop(blob, path, "interrupts",
+                                                  NULL);
                                if (prop)
                                        fdt_setprop(blob, path, "interrupts",
                                                    &tmp, sizeof(tmp));
@@ -100,7 +101,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
                                u32 tmp[] = { 35, 0x8, 36, 0x8, 37, 0x8 };
 
                                path = fdt_path_offset(blob, prop);
-                               prop = fdt_getprop(blob, path, "interrupts", 0);
+                               prop = fdt_getprop(blob, path, "interrupts",
+                                                  NULL);
                                if (prop)
                                        fdt_setprop(blob, path, "interrupts",
                                                    &tmp, sizeof(tmp));
index fb0f7aad6d7fe7df6b2941a2305d4f96117103f7..b8c05d15929ce33800e9848a5419a50560633f17 100644 (file)
@@ -52,7 +52,7 @@ typedef struct {
        mult_t vco_divider;
 } corecnf_t;
 
-corecnf_t corecnf_tab[] = {
+static corecnf_t corecnf_tab[] = {
        {_byp, _byp},           /* 0x00 */
        {_byp, _byp},           /* 0x01 */
        {_byp, _byp},           /* 0x02 */
@@ -531,7 +531,7 @@ ulong get_ddr_freq(ulong dummy)
        return gd->mem_clk;
 }
 
-int do_clocks (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        char buf[32];
 
index 730ec4e734808948c7b3331d8b1bed7723969a24..1071803c79ad001dd1abf72c7d39bb70edf9240a 100644 (file)
@@ -70,22 +70,22 @@ int checkboard(void)
 #ifndef CONFIG_NAND_SPL
 static struct pci_region pci_regions[] = {
        {
-               bus_start: CONFIG_SYS_PCI1_MEM_BASE,
-               phys_start: CONFIG_SYS_PCI1_MEM_PHYS,
-               size: CONFIG_SYS_PCI1_MEM_SIZE,
-               flags: PCI_REGION_MEM | PCI_REGION_PREFETCH
+               .bus_start = CONFIG_SYS_PCI1_MEM_BASE,
+               .phys_start = CONFIG_SYS_PCI1_MEM_PHYS,
+               .size = CONFIG_SYS_PCI1_MEM_SIZE,
+               .flags = PCI_REGION_MEM | PCI_REGION_PREFETCH
        },
        {
-               bus_start: CONFIG_SYS_PCI1_MMIO_BASE,
-               phys_start: CONFIG_SYS_PCI1_MMIO_PHYS,
-               size: CONFIG_SYS_PCI1_MMIO_SIZE,
-               flags: PCI_REGION_MEM
+               .bus_start = CONFIG_SYS_PCI1_MMIO_BASE,
+               .phys_start = CONFIG_SYS_PCI1_MMIO_PHYS,
+               .size = CONFIG_SYS_PCI1_MMIO_SIZE,
+               .flags = PCI_REGION_MEM
        },
        {
-               bus_start: CONFIG_SYS_PCI1_IO_BASE,
-               phys_start: CONFIG_SYS_PCI1_IO_PHYS,
-               size: CONFIG_SYS_PCI1_IO_SIZE,
-               flags: PCI_REGION_IO
+               .bus_start = CONFIG_SYS_PCI1_IO_BASE,
+               .phys_start = CONFIG_SYS_PCI1_IO_PHYS,
+               .size = CONFIG_SYS_PCI1_IO_SIZE,
+               .flags = PCI_REGION_IO
        }
 };