You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/13 14:52:38 UTC

[incubator-nuttx] branch master updated (80f9fe3 -> 9399167)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 80f9fe3  syscall/csv: sort lines of syscalls
     new 66bdec6  drivers/mtd/gd25.c: fix finfo format warning
     new 9399167  drivers/mtd/w25.c: fix finfo format warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 drivers/mtd/gd25.c |  5 +++--
 drivers/mtd/w25.c  | 14 +++++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)


[incubator-nuttx] 01/02: drivers/mtd/gd25.c: fix finfo format warning

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 66bdec675470cc0dd42df31366b6f1393a5e37c9
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Sun Dec 13 15:44:21 2020 +0200

    drivers/mtd/gd25.c: fix finfo format warning
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 drivers/mtd/gd25.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/gd25.c b/drivers/mtd/gd25.c
index ef1a99e..9c0b5b2 100644
--- a/drivers/mtd/gd25.c
+++ b/drivers/mtd/gd25.c
@@ -26,7 +26,7 @@
 
 #include <sys/types.h>
 
-#include <stdint.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -938,7 +938,8 @@ static int gd25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
               geo->neraseblocks = priv->nsectors;
               ret               = OK;
 
-              finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
+              finfo("blocksize: %" PRIu32 " erasesize: %" PRIu32
+                    " neraseblocks: %" PRIu32 "\n",
                     geo->blocksize, geo->erasesize, geo->neraseblocks);
             }
         }


[incubator-nuttx] 02/02: drivers/mtd/w25.c: fix finfo format warning

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 93991670af565eeb0fc7851fbc0dc73e702632a6
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Sun Dec 13 15:45:43 2020 +0200

    drivers/mtd/w25.c: fix finfo format warning
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 drivers/mtd/w25.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/w25.c b/drivers/mtd/w25.c
index f881aad..2b0c1d4 100644
--- a/drivers/mtd/w25.c
+++ b/drivers/mtd/w25.c
@@ -28,7 +28,7 @@
 
 #include <sys/types.h>
 
-#include <stdint.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -163,6 +163,7 @@
 #  define W25X64_SR_BP_LOWER8th    (12 << W25_SR_BP_SHIFT) /* Lower 8th */
 #  define W25X64_SR_BP_LOWERQTR    (13 << W25_SR_BP_SHIFT) /* Lower quarter */
 #  define W25X64_SR_BP_LOWERHALF   (14 << W25_SR_BP_SHIFT) /* Lower half */
+
                                              /* Bit 6: Reserved */
 #define W25_SR_SRP                 (1 << 7)  /* Bit 7: Status register write protect */
 
@@ -220,7 +221,7 @@ struct w25_dev_s
 
 #if defined(CONFIG_W25_SECTOR512) && !defined(CONFIG_W25_READONLY)
   uint8_t               flags;       /* Buffered sector flags */
-  uint16_t              esectno;     /* Erase sector number in the cache*/
+  uint16_t              esectno;     /* Erase sector number in the cache */
   FAR uint8_t          *sector;      /* Allocated sector data */
 #endif
 };
@@ -1261,7 +1262,8 @@ static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
 #endif
               ret               = OK;
 
-              finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
+              finfo("blocksize: %" PRIu32 " erasesize: %" PRIu32
+                    " neraseblocks: %" PRIu32 "\n",
                     geo->blocksize, geo->erasesize, geo->neraseblocks);
             }
         }
@@ -1350,7 +1352,9 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi)
         }
       else
         {
-          /* Make sure that the FLASH is unprotected so that we can write into it */
+          /* Make sure that the FLASH is unprotected so that we can write
+           * into it.
+           */
 
 #ifndef CONFIG_W25_READONLY
           w25_unprotect(priv);
@@ -1362,7 +1366,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi)
           priv->sector = (FAR uint8_t *)kmm_malloc(W25_SECTOR_SIZE);
           if (!priv->sector)
             {
-              /* Allocation failed! Discard all of that work we just did and return NULL */
+              /* Discard all of that work we just did and return NULL */
 
               ferr("ERROR: Allocation failed\n");
               kmm_free(priv);