fdt: remove build warnings caused by sprd bsp 40/165440/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Dec 2017 02:31:33 +0000 (11:31 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Dec 2017 02:31:37 +0000 (11:31 +0900)
Remove build warnings caused by sprd bsp.

Change-Id: I8989a6fdbac336354feb5736db2ea815ec19e95e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
common/fdt_support.c

index 7c389d5..a7253df 100644 (file)
@@ -37,6 +37,7 @@
 extern PUBLIC phys_size_t get_dram_size_from_gd(void);
 extern char* get_calibration_parameter(void);
 extern bool is_calibration_by_uart(void);
+extern int poweron_by_calibration(void);
 
 /**
  * fdt_getprop_u32_default - Find a node and return it's property or a default
@@ -219,7 +220,6 @@ int fdt_initrd_norsvmem(void *fdt, ulong initrd_start, ulong initrd_end, int for
        int   err;
        u32   tmp;
        const char *path;
-       uint64_t addr, size;
 
        /* Find the "chosen" node.  */
        nodeoffset = fdt_path_offset (fdt, "/chosen");
@@ -332,8 +332,8 @@ int fdt_chosen_bootargs_replace(void *fdt, char *old_args, char *new_args)
 {
        int nodeoffset;
        int err, i;
-       char *str, *src, *dst;
-       const char *path;
+       char *str, *dst;
+       const char *src, *path;
        char *strargs;
 
        if (!old_args || !new_args)
@@ -468,7 +468,7 @@ int fdt_chosen_bootargs_append(void *fdt, char* append_args,int force)
 int fdt_fixup_lcdid(void *fdt)
 {
        char buf[16];
-       extern uint32_t load_lcd_id_to_kernel();
+       extern uint32_t load_lcd_id_to_kernel(void);
        uint32_t lcd_id = 0;
        int str_len;
        int ret;
@@ -498,7 +498,7 @@ int fdt_fixup_lcdbase(void *fdt)
        //add lcd frame buffer base, length should be lcd w*h*2(RGB565)
        sprintf(buf, "lcd_base=");
        str_len = strlen(buf);
-       sprintf(&buf[str_len], "%x",lcd_base);
+       sprintf(&buf[str_len], "%lx",(unsigned long)lcd_base);
        str_len = strlen(buf);
        buf[str_len] = '\0';
 
@@ -625,13 +625,12 @@ int fdt_fixup_adc_calibration_data(void *fdt)
 {
     //extern unsigned int *adc_data_to_transfer;
     unsigned int *adc_data = malloc(64);
-    int ret = read_adc_calibration_data(adc_data,48);
+    int ret = read_adc_calibration_data((void *)adc_data,48);
 
     if (ret)
     {
         char buf[64];
         int str_len;
-        int ret;
 
         memset(buf, 0, 64);
         if(((adc_data[2]&0xffff) < 4500 )&&((adc_data[2]&0xffff) > 3000)&&
@@ -1680,11 +1679,10 @@ void fdt_debug_print_prop(void *fdt, const char *node_path, const char *name)
        int   nodeoffset;
        int   err;
        const char *path;
-       char *strargs;
        int     len;
        int i = 0;
 
-       printf("fdt addr: 0x%x\n", fdt);
+       printf("fdt addr: 0x%lx\n", (unsigned long)fdt);
 
        err = fdt_check_header(fdt);
        if (err < 0) {