This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

synth flash dev fixes (2)


this is the same patch again, but with correct %zd for the size_t printf's.
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synth/current/ChangeLog
--- a/packages/devs/flash/synth/current/ChangeLog	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synth/current/ChangeLog	Thu Nov 20 08:13:50 2008 +0100
@@ -1,3 +1,7 @@
+2008-11-19  Simon Kallweit  <simon.kallweit@intefo.ch>
+
+	* tests/flash2.c: Fixed a few warnings.
+
 2008-11-17  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* Merge from flash_v2 branch:
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synth/current/tests/flash2.c
--- a/packages/devs/flash/synth/current/tests/flash2.c	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synth/current/tests/flash2.c	Thu Nov 20 08:13:50 2008 +0100
@@ -98,7 +98,7 @@
       ret = cyg_flash_get_info(i, &info);
       if (ret == CYG_FLASH_ERR_OK) {
         diag_printf("INFO: Nth=%d, start=%p, end=%p\n",
-                    i, info.start, info.end);
+                    i, (void *) info.start, (void *) info.end);
         if (i == 0) {
           flash_start = info.start;
           flash_end = info.end;
@@ -106,7 +106,7 @@
           blocks = info.block_info[0].blocks;
         }
         for (j=0;j < info.num_block_infos; j++) {
-          diag_printf("INFO:\t block_size %d, blocks %d\n",
+          diag_printf("INFO:\t block_size %zd, blocks %u\n",
                       info.block_info[j].block_size,
                       info.block_info[j].blocks);
         }
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synthv2/current/ChangeLog
--- a/packages/devs/flash/synthv2/current/ChangeLog	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synthv2/current/ChangeLog	Thu Nov 20 08:13:50 2008 +0100
@@ -1,3 +1,9 @@
+2008-11-19  Simon Kallweit  <simon.kallweit@intefo.ch>
+
+	* src/synth.c: Removed cyg_hal_sys_do_mmap() wrapper function.
+	* tests/flash1.c, tests/flash2.c, tests/flash3.c:
+	Fixed a few compiler warnings.
+
 2004-12-02  Bart Veer  <bartv@ecoscentric.com>
 
 	* include/synth.h, src/synth.c: explicitly include
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synthv2/current/src/synth.c
--- a/packages/devs/flash/synthv2/current/src/synth.c	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synthv2/current/src/synth.c	Thu Nov 20 08:13:50 2008 +0100
@@ -64,25 +64,6 @@
 #define MIN(x,y) ((x)<(y) ? (x) : (y))
 #endif
 
-/* Helper function. The Linux system call cannot pass 6 parameters. Instead
-   a structure is filled in and passed as one parameter */
-static int 
-cyg_hal_sys_do_mmap(void *addr, unsigned long length, unsigned long prot, 
-                    unsigned long flags, unsigned long fd, unsigned long off)
-{
-
-    struct cyg_hal_sys_mmap_args args;
-  
-    args.addr = (unsigned long) addr;
-    args.len = length;
-    args.prot = prot = prot;
-    args.flags = flags;
-    args.fd = fd;
-    args.offset = off;
-
-    return (cyg_hal_sys_mmap(&args));
-}           
-
 static int
 synth_flash_init(struct cyg_flash_dev *dev)
 {
@@ -131,7 +112,7 @@
     if (dev->start != 0) {
         flags |= CYG_HAL_SYS_MAP_FIXED;
     }
-    base = (cyg_flashaddr_t)cyg_hal_sys_do_mmap( 
+    base = (cyg_flashaddr_t)cyg_hal_sys_mmap( 
         (void *)dev->start,
         priv->blocks * priv->block_size + 
         priv->boot_block_size * priv->boot_blocks,
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synthv2/current/tests/flash1.c
--- a/packages/devs/flash/synthv2/current/tests/flash1.c	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synthv2/current/tests/flash1.c	Thu Nov 20 08:13:50 2008 +0100
@@ -138,7 +138,7 @@
     CYG_TEST_PASS_FAIL((ret == 0),"flash program overrun check");
 
     /* Program over a block boundary */
-    prog_start = (unsigned char *)flash_start + block_size - sizeof(copyright)/2;
+    prog_start = (char *)flash_start + block_size - sizeof(copyright)/2;
     ret = flash_program(prog_start,&copyright,sizeof(copyright),NULL);
     CYG_TEST_PASS_FAIL((ret == FLASH_ERR_OK),"flash_program2");
   
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synthv2/current/tests/flash2.c
--- a/packages/devs/flash/synthv2/current/tests/flash2.c	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synthv2/current/tests/flash2.c	Thu Nov 20 08:13:50 2008 +0100
@@ -104,7 +104,7 @@
       ret = cyg_flash_get_info(i, &info);
       if (ret == CYG_FLASH_ERR_OK) {
         diag_printf("INFO: Nth=%d, start=%p, end=%p\n",
-                    i, info.start, info.end);
+                    i, (void *) info.start, (void *) info.end);
         if (i == 0) {
           flash_start = info.start;
           flash_end = info.end;
@@ -112,7 +112,7 @@
           blocks = info.block_info[0].blocks;
         }
         for (j=0;j < info.num_block_infos; j++) {
-          diag_printf("INFO:\t block_size %d, blocks %d\n",
+          diag_printf("INFO:\t block_size %zd, blocks %u\n",
                       info.block_info[j].block_size,
                       info.block_info[j].blocks);
         }
diff -r 06f9bc823a1e -r 85056f0eade5 packages/devs/flash/synthv2/current/tests/flash3.c
--- a/packages/devs/flash/synthv2/current/tests/flash3.c	Wed Nov 19 16:49:22 2008 +0100
+++ b/packages/devs/flash/synthv2/current/tests/flash3.c	Thu Nov 20 08:13:50 2008 +0100
@@ -128,7 +128,7 @@
       ret = cyg_flash_get_info(i, &info);
       if (ret == CYG_FLASH_ERR_OK) {
         diag_printf("INFO: Nth=%d, start=%p, end=%p\n",
-                    i, info.start, info.end);
+                    i, (void *) info.start, (void *) info.end);
         if (i == 0) {
           flash_start = info.start;
           flash_end = info.end;
@@ -137,7 +137,7 @@
         }
         
         for (j=0;j < info.num_block_infos; j++) {
-          diag_printf("INFO:\t block_size %d, blocks %d\n",
+          diag_printf("INFO:\t block_size %zd, blocks %u\n",
                       info.block_info[j].block_size,
                       info.block_info[j].blocks);
         }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]