]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix some more printf() format problems.
authorWolfgang Denk <wd@denx.de>
Sun, 13 Jul 2008 17:51:00 +0000 (19:51 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 13 Jul 2008 17:51:00 +0000 (19:51 +0200)
Signed-off-by: Wolfgang Denk <wd@denx.de>
common/cmd_flash.c
common/cmd_nvedit.c
drivers/usb/usbdcore.c
fs/jffs2/jffs2_1pass.c

index 1dd0c99ff7acd980d0b83d051c5842ca9e926ac5..9bd8074bfb39114779931dcdeface26b59b134bb 100644 (file)
@@ -342,7 +342,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        puts ("Bad sector specification\n");
                        return 1;
                }
-               printf ("Erase Flash Sectors %d-%d in Bank # %ld ",
+               printf ("Erase Flash Sectors %d-%d in Bank # %d ",
                        sect_first, sect_last, (info-flash_info)+1);
                rcode = flash_erase(info, sect_first, sect_last);
                return rcode;
@@ -534,7 +534,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        puts ("Bad sector specification\n");
                        return 1;
                }
-               printf("%sProtect Flash Sectors %d-%d in Bank # %ld\n",
+               printf("%sProtect Flash Sectors %d-%d in Bank # %d\n",
                        p ? "" : "Un-", sect_first, sect_last,
                        (info-flash_info)+1);
                for (i = sect_first; i <= sect_last; i++) {
index aaf6d98da88c27497c59e85ef81702dfb96665e1..70897062a6fb11e03b76f76213d64f0dd16ee320 100644 (file)
@@ -99,7 +99,8 @@ int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        }
                }
 
-               printf("\nEnvironment size: %d/%ld bytes\n", i, ENV_SIZE);
+               printf("\nEnvironment size: %d/%ld bytes\n",
+                       i, (ulong)ENV_SIZE);
 
                return 0;
        }
index 58e710f36972e38d9235b1e0a6f1eedb8206e531..808da9faa5c144092240631895595e235f3a7928 100644 (file)
@@ -546,21 +546,23 @@ void urb_append (urb_link * hd, struct urb *urb)
  *
  * NOTE: endpoint_address MUST contain a direction flag.
  */
-struct urb *usbd_alloc_urb (struct usb_device_instance *device, struct usb_endpoint_instance *endpoint)
+struct urb *usbd_alloc_urb (struct usb_device_instance *device,
+                           struct usb_endpoint_instance *endpoint)
 {
        struct urb *urb;
 
-       if( !(urb = (struct urb*)malloc(sizeof(struct urb))) ) {
-         usberr(" F A T A L:  malloc(%lu) FAILED!!!!", sizeof(struct urb));
-         return NULL;
+       if (!(urb = (struct urb *) malloc (sizeof (struct urb)))) {
+               usberr (" F A T A L:  malloc(%u) FAILED!!!!",
+                       sizeof (struct urb));
+               return NULL;
        }
 
        /* Fill in known fields */
-       memset(urb, 0, sizeof(struct urb));
+       memset (urb, 0, sizeof (struct urb));
        urb->endpoint = endpoint;
        urb->device = device;
-       urb->buffer = (u8*)urb->buffer_data;
-       urb->buffer_length = sizeof(urb->buffer_data);
+       urb->buffer = (u8 *) urb->buffer_data;
+       urb->buffer_length = sizeof (urb->buffer_data);
 
        urb_link_init (&urb->link);
 
index c7db46e0532857c14764b73cfdfa5d3faa7f5794..5c1d2652550043558169d80ee029308bc06e5130 100644 (file)
@@ -1213,12 +1213,12 @@ jffs2_1pass_build_lists(struct part_info * part)
                        } else if (node->nodetype == JFFS2_NODETYPE_CLEANMARKER) {
                                if (node->totlen != sizeof(struct jffs2_unknown_node))
                                        printf("OOPS Cleanmarker has bad size "
-                                               "%d != %lu\n", node->totlen,
+                                               "%d != %u\n", node->totlen,
                                                sizeof(struct jffs2_unknown_node));
                        } else if (node->nodetype == JFFS2_NODETYPE_PADDING) {
                                if (node->totlen < sizeof(struct jffs2_unknown_node))
                                        printf("OOPS Padding has bad size "
-                                               "%d < %lu\n", node->totlen,
+                                               "%d < %u\n", node->totlen,
                                                sizeof(struct jffs2_unknown_node));
                        } else {
                                printf("Unknown node type: %x len %d "