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 2022/11/13 14:35:24 UTC

[incubator-nuttx] branch master updated (36c511f710 -> b44e743483)

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 36c511f710 fs/littlefs: set `LFS_NAME_MAX` to `CONFIG_NAME_MAX`
     new 2670229cb9 Fix Error: chip/sam_udp.c:2805:1: error: unused function 'sam_ep_reserved' [-Werror,-Wunused-function]
     new e221cf6f5e Fix Error: chip/s32k1xx_lpspi.c:804:12: error: variable 'best_delay' set but not used [-Werror,-Wunused-but-set-variable]
     new 6b5ce2f4d0 Fix Error: chip/s32k1xx_lpi2c.c:644:1: error: unused function 's32k1xx_lpi2c_sem_waitstop' [-Werror,-Wunused-function]
     new d05d5e4915 Fix Error: chip/s32k1xx_lpi2c.c:1226:1: error: unused function 's32k1xx_lpi2c_getenabledints' [-Werror,-Wunused-function]
     new ba286e3824 Fix Error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
     new 9f685435d0 Fix Error: chip/rp2040_clock.c:148:19: error: invalid instruction
     new c6873ff5a2 Fix Error: chip/rp2040_cyw43439.c:844:46: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
     new fb618666f6 Fix Error: chip/nuc_serial.c:357:20: error: unused function 'up_restoreuartint' [-Werror,-Wunused-function]
     new 492da4d56d Fix Error: chip/nuc_timerisr.c:105:20: error: unused function 'nuc_unlock' [-Werror,-Wunused-function]
     new 29c46d8734 Fix Error: armv8-m/arm_cache.c:93:24: error: unused function 'arm_clz' [-Werror,-Wunused-function]
     new 0f85cf7503 Fix Error: chip/max32660/max32660_serial.c:304:20: error: unused function 'max326_modifyreg' [-Werror,-Wunused-function]
     new e0f1c41695 Fix Error: chip/s32k1xx_lpspi.c:581:9: error: unused function 's32k1xx_lpspi_[write|read]byte'
     new 7e823fc862 Fix chip/sam_usb.c:1242:12: error: variable 'packetsize' set but not used [-Werror,-Wunused-but-set-variable]
     new 94655e95ea Fix chip/sam_serial.c:900:20: error: unused function 'sam_restoreusartint' [-Werror,-Wunused-function]
     new f52ad42425 Fix error: unknown attribute 'long_call' ignored [-Werror,-Wunknown-attributes]
     new 677932293b Fix Error: chip/sam_afec.c:546:22: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
     new c741b7b586 Fix Error: chip/sam_tc.c:922:30: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
     new b44e743483 Fix Error: wireless/ieee802154/mrf24j40/mrf24j40_radif.c:138:45: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

The 18 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:
 arch/arm/src/armv8-m/arm_cache.c                   |   2 +
 arch/arm/src/imxrt/imxrt_lpspi.c                   |  20 ----
 arch/arm/src/max326xx/max32660/max32660_serial.c   |  22 ----
 arch/arm/src/nuc1xx/nuc_serial.c                   |   2 +
 arch/arm/src/nuc1xx/nuc_timerisr.c                 |   4 +-
 arch/arm/src/rp2040/rp2040_clock.c                 |  15 +--
 arch/arm/src/rp2040/rp2040_cyw43439.c              |   4 +-
 arch/arm/src/rp2040/rp2040_ws2812.c                |  10 +-
 arch/arm/src/s32k1xx/s32k1xx_lpi2c.c               |  93 +---------------
 arch/arm/src/s32k1xx/s32k1xx_lpspi.c               | 121 ---------------------
 arch/arm/src/s32k3xx/s32k3xx_lpspi.c               |  20 ----
 arch/arm/src/sam34/sam_udp.c                       |  16 ---
 arch/arm/src/sama5/sam_adc.c                       |   2 +-
 arch/arm/src/sama5/sam_udphs.c                     |  16 ---
 arch/arm/src/samd2l2/sam_usb.c                     |  50 ---------
 arch/arm/src/samd5e5/sam_usb.c                     |  21 ----
 arch/arm/src/samv7/sam_afec.c                      |   2 +-
 arch/arm/src/samv7/sam_dac.c                       |   2 +-
 arch/arm/src/samv7/sam_serial.c                    |   2 +
 arch/arm/src/samv7/sam_tc.c                        |   2 +-
 arch/arm/src/samv7/sam_usbdevhs.c                  |  17 ---
 .../wireless/ieee802154/mrf24j40/mrf24j40_radif.c  |   2 +-
 include/nuttx/compiler.h                           |   6 +-
 23 files changed, 33 insertions(+), 418 deletions(-)


[incubator-nuttx] 07/18: Fix Error: chip/rp2040_cyw43439.c:844:46: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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 c6873ff5a26cbf2b3d22c5bb242ab5aa02a6fb3c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:01:27 2022 +0800

    Fix Error: chip/rp2040_cyw43439.c:844:46: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/rp2040/rp2040_cyw43439.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/rp2040/rp2040_cyw43439.c b/arch/arm/src/rp2040/rp2040_cyw43439.c
index 45a7348c46..21d9442f41 100644
--- a/arch/arm/src/rp2040/rp2040_cyw43439.c
+++ b/arch/arm/src/rp2040/rp2040_cyw43439.c
@@ -841,9 +841,9 @@ gspi_dev_t *rp2040_cyw_setup(uint8_t gpio_on,
       return NULL;
     }
 
-  wlinfo("setup complete. gspi = 0x%08lX\n", (uint32_t) gspi);
+  wlinfo("setup complete. gspi = 0x%p\n", gspi);
 
-  return (void *)gspi;
+  return gspi;
 }
 
 /****************************************************************************


[incubator-nuttx] 05/18: Fix Error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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 ba286e38245291cf5170965bb596dec9d3ae22e2
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:50:54 2022 +0800

    Fix Error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/rp2040/rp2040_ws2812.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/rp2040/rp2040_ws2812.c b/arch/arm/src/rp2040/rp2040_ws2812.c
index f6aeb25093..a0f5622e2f 100644
--- a/arch/arm/src/rp2040/rp2040_ws2812.c
+++ b/arch/arm/src/rp2040/rp2040_ws2812.c
@@ -180,13 +180,13 @@ static int my_open(struct file *filep)
     {
       /* We've already been initialized.  Keep on truckin' */
 
-      ledinfo("rp2040_ws2812 re-open dev: 0x%08lX\n", (uint32_t) dev_data);
+      ledinfo("rp2040_ws2812 re-open dev: 0x%p\n", dev_data);
 
       ret = OK;
       goto post_and_return;
     }
 
-  ledinfo("rp2040_ws2812 open dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 open dev: 0x%p\n", dev_data);
 
   /* Allocate the pixel buffer */
 
@@ -344,7 +344,7 @@ static int my_close(struct file *filep)
 
   nxmutex_lock(&dev_data->lock);
 
-  ledinfo("rp2040_ws2812 close dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 close dev: 0x%p\n", dev_data);
 
   priv->open_count -= 1;
 
@@ -390,7 +390,7 @@ static ssize_t my_write(struct file *filep,
 
   nxmutex_lock(&dev_data->lock);
 
-  ledinfo("rp2040_ws2812 write dev: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("rp2040_ws2812 write dev: 0x%p\n", dev_data);
 
   if (len > 0)
     {
@@ -577,7 +577,7 @@ void * rp2040_ws2812_setup(const char *path,
 
   priv->power_pin     = power_pin;
 
-  ledinfo("register dev_data: 0x%08lX\n", (uint32_t) dev_data);
+  ledinfo("register dev_data: 0x%p\n", dev_data);
 
   err = ws2812_register(path, dev_data);
 


[incubator-nuttx] 02/18: Fix Error: chip/s32k1xx_lpspi.c:804:12: error: variable 'best_delay' set but not used [-Werror,-Wunused-but-set-variable]

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 e221cf6f5e2ad68f7fef5475aa34f8c27dfeb9a3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:03:27 2022 +0800

    Fix Error: chip/s32k1xx_lpspi.c:804:12: error: variable 'best_delay' set but not used [-Werror,-Wunused-but-set-variable]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/imxrt/imxrt_lpspi.c     | 20 --------------------
 arch/arm/src/s32k1xx/s32k1xx_lpspi.c | 20 --------------------
 arch/arm/src/s32k3xx/s32k3xx_lpspi.c | 20 --------------------
 3 files changed, 60 deletions(-)

diff --git a/arch/arm/src/imxrt/imxrt_lpspi.c b/arch/arm/src/imxrt/imxrt_lpspi.c
index dee7ad4490..da5ee76a7b 100644
--- a/arch/arm/src/imxrt/imxrt_lpspi.c
+++ b/arch/arm/src/imxrt/imxrt_lpspi.c
@@ -717,7 +717,6 @@ static inline void imxrt_lpspi_master_set_delays(
   uint32_t pll_freq;
   uint32_t src_freq;
   uint64_t real_delay;
-  uint64_t best_delay;
   uint32_t scaler;
   uint32_t best_scaler;
   uint32_t diff;
@@ -773,15 +772,6 @@ static inline void imxrt_lpspi_master_set_delays(
       initial_delay_ns *= 2;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* based on DBT+2, or 255 + 2 */
-
-      best_delay *= 257;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 1U;
     }
   else
@@ -795,15 +785,6 @@ static inline void imxrt_lpspi_master_set_delays(
       initial_delay_ns = 1000000000U;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
-
-      best_delay *= 256;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 0;
     }
 
@@ -846,7 +827,6 @@ static inline void imxrt_lpspi_master_set_delays(
 
                   min_diff = diff;
                   best_scaler = scaler;
-                  best_delay = real_delay;
                 }
             }
         }
diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
index 438facb568..6b02673bd8 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
@@ -801,7 +801,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
 {
   uint32_t inclock;
   uint64_t real_delay;
-  uint64_t best_delay;
   uint32_t scaler;
   uint32_t best_scaler;
   uint32_t diff;
@@ -840,15 +839,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
       initial_delay_ns *= 2;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* based on DBT+2, or 255 + 2 */
-
-      best_delay *= 257;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 1U;
     }
   else
@@ -862,15 +852,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
       initial_delay_ns = 1000000000U;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
-
-      best_delay *= 256;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 0;
     }
 
@@ -913,7 +894,6 @@ void s32k1xx_lpspi_set_delays(struct s32k1xx_lpspidev_s *priv,
 
                   min_diff = diff;
                   best_scaler = scaler;
-                  best_delay = real_delay;
                 }
             }
         }
diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpspi.c b/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
index 001dd8beda..8bce87ab79 100644
--- a/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
+++ b/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
@@ -904,7 +904,6 @@ static inline uint32_t
 {
   uint32_t inclock;
   uint64_t real_delay;
-  uint64_t best_delay;
   uint32_t scaler;
   uint32_t best_scaler;
   uint32_t diff;
@@ -943,15 +942,6 @@ static inline uint32_t
       initial_delay_ns *= 2;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* based on DBT+2, or 255 + 2 */
-
-      best_delay *= 257;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 1U;
     }
   else
@@ -965,15 +955,6 @@ static inline uint32_t
       initial_delay_ns = 1000000000U;
       initial_delay_ns /= clock_div_prescaler;
 
-      /* Calculate the maximum delay */
-
-      best_delay = 1000000000U;
-
-      /* Based on SCKPCS+1 or PCSSCK+1, or 255 + 1 */
-
-      best_delay *= 256;
-      best_delay /= clock_div_prescaler;
-
       additional_scaler = 0;
     }
 
@@ -1016,7 +997,6 @@ static inline uint32_t
 
                   min_diff = diff;
                   best_scaler = scaler;
-                  best_delay = real_delay;
                 }
             }
         }


[incubator-nuttx] 06/18: Fix Error: chip/rp2040_clock.c:148:19: error: invalid instruction

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 9f685435d050e9b3d9d846fa1509e1640066e253
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:56:42 2022 +0800

    Fix Error: chip/rp2040_clock.c:148:19: error: invalid instruction
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/rp2040/rp2040_clock.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/arch/arm/src/rp2040/rp2040_clock.c b/arch/arm/src/rp2040/rp2040_clock.c
index d275d58f24..e874ac543e 100644
--- a/arch/arm/src/rp2040/rp2040_clock.c
+++ b/arch/arm/src/rp2040/rp2040_clock.c
@@ -141,15 +141,12 @@ bool rp2040_clock_configure(int clk_index,
            * necessarily running, nor is timer... so, 3 cycles per loop:
            */
 
-          unsigned int delay_cyc = rp2040_clock_freq[RP2040_CLOCKS_NDX_SYS] /
-                                   rp2040_clock_freq[clk_index] + 1;
-
-          __asm__ volatile (
-            "1: \n\t"
-            "sub %0, #1 \n\t"
-            "bne 1b"
-            : "+r" (delay_cyc)
-          );
+          volatile unsigned int delay_cyc;
+
+          delay_cyc = rp2040_clock_freq[RP2040_CLOCKS_NDX_SYS] /
+                      rp2040_clock_freq[clk_index] + 1;
+
+          while (--delay_cyc > 0);
         }
     }
 


[incubator-nuttx] 04/18: Fix Error: chip/s32k1xx_lpi2c.c:1226:1: error: unused function 's32k1xx_lpi2c_getenabledints' [-Werror,-Wunused-function]

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 d05d5e4915ad13c87cea0d68de5e9faaf14915ff
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:05:56 2022 +0800

    Fix Error: chip/s32k1xx_lpi2c.c:1226:1: error: unused function 's32k1xx_lpi2c_getenabledints' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/s32k1xx/s32k1xx_lpi2c.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
index 17b7685d35..a18a86057a 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
@@ -1131,11 +1131,13 @@ s32k1xx_lpi2c_getstatus(struct s32k1xx_lpi2c_priv_s *priv)
  *
  ****************************************************************************/
 
+#ifdef CONFIG_S32K1XX_LPI2C_DMA
 static inline uint32_t
 s32k1xx_lpi2c_getenabledints(struct s32k1xx_lpi2c_priv_s *priv)
 {
   return s32k1xx_lpi2c_getreg(priv, S32K1XX_LPI2C_MIER_OFFSET);
 }
+#endif
 
 /****************************************************************************
  * Name: s32k1xx_lpi2c_isr_process


[incubator-nuttx] 13/18: Fix chip/sam_usb.c:1242:12: error: variable 'packetsize' set but not used [-Werror,-Wunused-but-set-variable]

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 7e823fc862de4d411f6c4f00184d58c7fa5ac456
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 16:58:14 2022 +0800

    Fix chip/sam_usb.c:1242:12: error: variable 'packetsize' set but not used [-Werror,-Wunused-but-set-variable]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/samd2l2/sam_usb.c | 34 ----------------------------------
 arch/arm/src/samd5e5/sam_usb.c |  5 -----
 2 files changed, 39 deletions(-)

diff --git a/arch/arm/src/samd2l2/sam_usb.c b/arch/arm/src/samd2l2/sam_usb.c
index 4b5bd5c17f..86aa252448 100644
--- a/arch/arm/src/samd2l2/sam_usb.c
+++ b/arch/arm/src/samd2l2/sam_usb.c
@@ -380,7 +380,6 @@ struct sam_usbdev_s
 #ifdef CONFIG_SAMD2L2_USB_REGDEBUG
 static void   sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite);
 static void   sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite);
-static uint32_t sam_getreg32(uintptr_t regaddr);
 static void   sam_putreg32(uint32_t regval, uintptr_t regaddr);
 static uint32_t sam_getreg16(uintptr_t regaddr);
 static void   sam_putreg16(uint16_t regval, uintptr_t regaddr);
@@ -388,7 +387,6 @@ static uint32_t sam_getreg8(uintptr_t regaddr);
 static void   sam_putreg8(uint8_t regval, uintptr_t regaddr);
 static void   sam_dumpep(struct sam_usbdev_s *priv, uint8_t epno);
 #else
-static inline uint32_t sam_getreg32(uintptr_t regaddr);
 static inline void sam_putreg32(uint32_t regval, uintptr_t regaddr);
 static inline uint32_t sam_getreg16(uintptr_t regaddr);
 static inline void sam_putreg16(uint16_t regval, uintptr_t regaddr);
@@ -713,33 +711,6 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite)
 }
 #endif
 
-/****************************************************************************
- * Name: sam_getreg32
- *
- * Description:
- *   Get the contents of an 32-bit SAMD2L2 USB register
- *
- ****************************************************************************/
-
-#ifdef CONFIG_SAMD2L2_USB_REGDEBUG
-static uint32_t sam_getreg32(uintptr_t regaddr)
-{
-  /* Read the value from the register */
-
-  uint32_t regval = getreg32(regaddr);
-
-  /* Check if we need to print this value */
-
-  sam_checkreg(regaddr, regval, false);
-  return regval;
-}
-#else
-static inline uint32_t sam_getreg32(uintptr_t regaddr)
-{
-  return getreg32(regaddr);
-}
-#endif
-
 /****************************************************************************
  * Name: sam_putreg32
  *
@@ -1239,7 +1210,6 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
                         uint16_t recvsize)
 {
   struct sam_req_s *privreq;
-  uint32_t packetsize;
   int epno;
 
   DEBUGASSERT(priv && privep && privep->epstate == USB_EPSTATE_IDLE);
@@ -1311,10 +1281,6 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
   privreq->req.xfrd = 0;
   privreq->inflight = privreq->req.len;
   priv->eplist[epno].descb[0]->addr = (uint32_t) privreq->req.buf;
-  packetsize        = priv->eplist[epno].descb[0]->pktsize;
-  packetsize       &= ~USBDEV_PKTSIZE_BCNT_MASK;
-  packetsize       &= ~USBDEV_PKTSIZE_MPKTSIZE_MASK;
-  packetsize       |=  USBDEV_PKTSIZE_MPKTSIZE(privreq->inflight);
   sam_putreg8(USBDEV_EPSTATUS_BK0RDY, SAM_USBDEV_EPSTATUSCLR(epno));
 
   return OK;
diff --git a/arch/arm/src/samd5e5/sam_usb.c b/arch/arm/src/samd5e5/sam_usb.c
index a0d9d356e9..447cfaff13 100644
--- a/arch/arm/src/samd5e5/sam_usb.c
+++ b/arch/arm/src/samd5e5/sam_usb.c
@@ -1878,7 +1878,6 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
                         uint16_t recvsize)
 {
   struct sam_req_s *privreq;
-  uint32_t packetsize;
   int epno;
 
   DEBUGASSERT(priv && privep && privep->epstate == USB_EPSTATE_IDLE);
@@ -1951,10 +1950,6 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
   privreq->inflight = privreq->req.len;
   priv->eplist[epno].descb[0]->addr = (uint32_t) privreq->req.buf;
   uinfo("addr=%p\n", privreq->req.buf);
-  packetsize        = priv->eplist[epno].descb[0]->pktsize;
-  packetsize       &= ~USBDEV_PKTSIZE_BCNT_MASK;
-  packetsize       &= ~USBDEV_PKTSIZE_MPKTSIZE_MASK;
-  packetsize       |=  USBDEV_PKTSIZE_MPKTSIZE(privreq->inflight);
   sam_putreg8(USBDEV_EPSTATUS_BK0RDY, SAM_USBDEV_EPSTATUSCLR(epno));
 
   return OK;


[incubator-nuttx] 11/18: Fix Error: chip/max32660/max32660_serial.c:304:20: error: unused function 'max326_modifyreg' [-Werror,-Wunused-function]

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 0f85cf7503831ddc3105f30e95812f27466f9f36
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:11:18 2022 +0800

    Fix Error: chip/max32660/max32660_serial.c:304:20: error: unused function 'max326_modifyreg' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/max326xx/max32660/max32660_serial.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/arch/arm/src/max326xx/max32660/max32660_serial.c b/arch/arm/src/max326xx/max32660/max32660_serial.c
index 7c76975b8d..bf6699a929 100644
--- a/arch/arm/src/max326xx/max32660/max32660_serial.c
+++ b/arch/arm/src/max326xx/max32660/max32660_serial.c
@@ -297,28 +297,6 @@ static inline void max326_serialout(struct max326_dev_s *priv,
   putreg32(value, priv->uartbase + offset);
 }
 
-/****************************************************************************
- * Name: max326_modifyreg
- ****************************************************************************/
-
-static inline void max326_modifyreg(struct max326_dev_s *priv,
-                                    unsigned int offset, uint32_t setbits,
-                                    uint32_t clrbits)
-{
-  irqstate_t flags;
-  uintptr_t regaddr = priv->uartbase + offset;
-  uint32_t regval;
-
-  flags   = enter_critical_section();
-
-  regval  = getreg32(regaddr);
-  regval &= ~clrbits;
-  regval |= setbits;
-  putreg32(regval, regaddr);
-
-  leave_critical_section(flags);
-}
-
 /****************************************************************************
  * Name: max326_int_enable
  ****************************************************************************/


[incubator-nuttx] 15/18: Fix error: unknown attribute 'long_call' ignored [-Werror,-Wunknown-attributes]

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 f52ad42425009e1dc6f96ac368ff533dc47b0416
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 17:11:58 2022 +0800

    Fix error: unknown attribute 'long_call' ignored [-Werror,-Wunknown-attributes]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/nuttx/compiler.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 7e1407d32b..dcafb0a6e9 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -148,7 +148,11 @@
  * (even though -mlong-calls does not appear in the compilation options)
  */
 
-#  define farcall_function __attribute__ ((long_call))
+#  if defined(__clang__)
+#    define farcall_function
+#  else
+#    define farcall_function __attribute__ ((long_call))
+#  endif
 
 /* Code locate */
 


[incubator-nuttx] 01/18: Fix Error: chip/sam_udp.c:2805:1: error: unused function 'sam_ep_reserved' [-Werror,-Wunused-function]

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 2670229cb9723f73dcc45cd890007bc1f431a5d7
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 09:46:32 2022 +0800

    Fix Error: chip/sam_udp.c:2805:1: error: unused function 'sam_ep_reserved' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/sam34/sam_udp.c      | 16 ----------------
 arch/arm/src/sama5/sam_udphs.c    | 16 ----------------
 arch/arm/src/samd2l2/sam_usb.c    | 16 ----------------
 arch/arm/src/samd5e5/sam_usb.c    | 16 ----------------
 arch/arm/src/samv7/sam_usbdevhs.c | 17 -----------------
 5 files changed, 81 deletions(-)

diff --git a/arch/arm/src/sam34/sam_udp.c b/arch/arm/src/sam34/sam_udp.c
index d8dc266375..c7ac175fa1 100644
--- a/arch/arm/src/sam34/sam_udp.c
+++ b/arch/arm/src/sam34/sam_udp.c
@@ -388,8 +388,6 @@ static inline struct sam_ep_s *
 static inline void
               sam_ep_unreserve(struct sam_usbdev_s *priv,
                 struct sam_ep_s *privep);
-static inline bool
-              sam_ep_reserved(struct sam_usbdev_s *priv, int epno);
 static int    sam_ep_configure_internal(struct sam_ep_s *privep,
                 const struct usb_epdesc_s *desc);
 
@@ -2793,20 +2791,6 @@ sam_ep_unreserve(struct sam_usbdev_s *priv, struct sam_ep_s *privep)
   leave_critical_section(flags);
 }
 
-/****************************************************************************
- * Name: sam_ep_reserved
- *
- * Description:
- *   Check if the endpoint has already been allocated.
- *
- ****************************************************************************/
-
-static inline bool
-sam_ep_reserved(struct sam_usbdev_s *priv, int epno)
-{
-  return ((priv->epavail & SAM_EP_BIT(epno)) == 0);
-}
-
 /****************************************************************************
  * Name: sam_ep_configure_internal
  *
diff --git a/arch/arm/src/sama5/sam_udphs.c b/arch/arm/src/sama5/sam_udphs.c
index 35a76cd84c..41cf3823f6 100644
--- a/arch/arm/src/sama5/sam_udphs.c
+++ b/arch/arm/src/sama5/sam_udphs.c
@@ -465,8 +465,6 @@ static inline struct sam_ep_s *
 static inline void
               sam_ep_unreserve(struct sam_usbdev_s *priv,
                 struct sam_ep_s *privep);
-static inline bool
-              sam_ep_reserved(struct sam_usbdev_s *priv, int epno);
 static int    sam_ep_configure_internal(struct sam_ep_s *privep,
                 const struct usb_epdesc_s *desc);
 
@@ -3235,20 +3233,6 @@ sam_ep_unreserve(struct sam_usbdev_s *priv, struct sam_ep_s *privep)
   leave_critical_section(flags);
 }
 
-/****************************************************************************
- * Name: sam_ep_reserved
- *
- * Description:
- *   Check if the endpoint has already been allocated.
- *
- ****************************************************************************/
-
-static inline bool
-sam_ep_reserved(struct sam_usbdev_s *priv, int epno)
-{
-  return ((priv->epavail & SAM_EP_BIT(epno)) == 0);
-}
-
 /****************************************************************************
  * Name: sam_ep_configure_internal
  *
diff --git a/arch/arm/src/samd2l2/sam_usb.c b/arch/arm/src/samd2l2/sam_usb.c
index fbf48121d7..4b5bd5c17f 100644
--- a/arch/arm/src/samd2l2/sam_usb.c
+++ b/arch/arm/src/samd2l2/sam_usb.c
@@ -441,8 +441,6 @@ static inline struct sam_ep_s *
 static inline void
               sam_ep_unreserve(struct sam_usbdev_s *priv,
                 struct sam_ep_s *privep);
-static inline bool
-              sam_ep_reserved(struct sam_usbdev_s *priv, int epno);
 static int    sam_ep_configure_internal(struct sam_ep_s *privep,
                 const struct usb_epdesc_s *desc);
 
@@ -1579,20 +1577,6 @@ sam_ep_unreserve(struct sam_usbdev_s *priv, struct sam_ep_s *privep)
   leave_critical_section(flags);
 }
 
-/****************************************************************************
- * Name: sam_ep_reserved
- *
- * Description:
- *   Check if the endpoint has already been allocated.
- *
- ****************************************************************************/
-
-static inline bool
-sam_ep_reserved(struct sam_usbdev_s *priv, int epno)
-{
-  return ((priv->epavail & SAM_EP_BIT(epno)) == 0);
-}
-
 /****************************************************************************
  * Name: sam_ep_configure
  *
diff --git a/arch/arm/src/samd5e5/sam_usb.c b/arch/arm/src/samd5e5/sam_usb.c
index eb0d963b26..a0d9d356e9 100644
--- a/arch/arm/src/samd5e5/sam_usb.c
+++ b/arch/arm/src/samd5e5/sam_usb.c
@@ -777,8 +777,6 @@ static inline struct sam_ep_s *
 static inline void
               sam_ep_unreserve(struct sam_usbdev_s *priv,
                 struct sam_ep_s *privep);
-static inline bool
-              sam_ep_reserved(struct sam_usbdev_s *priv, int epno);
 static int    sam_ep_configure_internal(struct sam_ep_s *privep,
                 const struct usb_epdesc_s *desc);
 
@@ -2221,20 +2219,6 @@ sam_ep_unreserve(struct sam_usbdev_s *priv, struct sam_ep_s *privep)
   leave_critical_section(flags);
 }
 
-/****************************************************************************
- * Name: sam_ep_reserved
- *
- * Description:
- *   Check if the endpoint has already been allocated.
- *
- ****************************************************************************/
-
-static inline bool
-sam_ep_reserved(struct sam_usbdev_s *priv, int epno)
-{
-  return ((priv->epavail & SAM_EP_BIT(epno)) == 0);
-}
-
 /****************************************************************************
  * Endpoint operations
  ****************************************************************************/
diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c
index 438235798c..afbf4d8cd5 100644
--- a/arch/arm/src/samv7/sam_usbdevhs.c
+++ b/arch/arm/src/samv7/sam_usbdevhs.c
@@ -533,8 +533,6 @@ static inline struct sam_ep_s *
 static inline void
               sam_ep_unreserve(struct sam_usbdev_s *priv,
                 struct sam_ep_s *privep);
-static inline bool
-              sam_ep_reserved(struct sam_usbdev_s *priv, int epno);
 static int    sam_ep_configure_internal(struct sam_ep_s *privep,
                 const struct usb_epdesc_s *desc);
 static inline int
@@ -3592,21 +3590,6 @@ sam_ep_unreserve(struct sam_usbdev_s *priv, struct sam_ep_s *privep)
   leave_critical_section(flags);
 }
 
-/****************************************************************************
- *
- * Name: sam_ep_reserved
- *
- * Description:
- *   Check if the endpoint has already been allocated.
- *
- ****************************************************************************/
-
-static inline bool
-sam_ep_reserved(struct sam_usbdev_s *priv, int epno)
-{
-  return ((priv->epavail & SAM_EP_BIT(epno)) == 0);
-}
-
 /****************************************************************************
  *
  * Name: sam_ep_configure_internal


[incubator-nuttx] 08/18: Fix Error: chip/nuc_serial.c:357:20: error: unused function 'up_restoreuartint' [-Werror,-Wunused-function]

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 fb618666f6817d2b81e913958277e8cf718f6b41
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:03:50 2022 +0800

    Fix Error: chip/nuc_serial.c:357:20: error: unused function 'up_restoreuartint' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/nuc1xx/nuc_serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/nuc1xx/nuc_serial.c b/arch/arm/src/nuc1xx/nuc_serial.c
index aa600d3736..34016e1342 100644
--- a/arch/arm/src/nuc1xx/nuc_serial.c
+++ b/arch/arm/src/nuc1xx/nuc_serial.c
@@ -354,12 +354,14 @@ static inline void up_disableuartint(struct nuc_dev_s *priv, uint32_t *ier)
  * Name: up_restoreuartint
  ****************************************************************************/
 
+#ifdef HAVE_CONSOLE
 static inline void up_restoreuartint(struct nuc_dev_s *priv, uint32_t ier)
 {
   uint32_t setbits = ier & UART_IER_ALLIE;
   uint32_t clrbits = (~ier) & UART_IER_ALLIE;
   up_setier(priv, clrbits, setbits);
 }
+#endif
 
 /****************************************************************************
  * Name: up_rxto_disable


[incubator-nuttx] 03/18: Fix Error: chip/s32k1xx_lpi2c.c:644:1: error: unused function 's32k1xx_lpi2c_sem_waitstop' [-Werror,-Wunused-function]

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 6b5ce2f4d040a2cc97e76ec5c9a8e455bd6e109c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:04:53 2022 +0800

    Fix Error: chip/s32k1xx_lpi2c.c:644:1: error: unused function 's32k1xx_lpi2c_sem_waitstop' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/s32k1xx/s32k1xx_lpi2c.c | 91 ------------------------------------
 1 file changed, 91 deletions(-)

diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
index 593f90f96f..17b7685d35 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
@@ -239,8 +239,6 @@ s32k1xx_lpi2c_toticks(int msgc, struct i2c_msg_s *msgs);
 
 static inline int
 s32k1xx_lpi2c_sem_waitdone(struct s32k1xx_lpi2c_priv_s *priv);
-static inline void
-s32k1xx_lpi2c_sem_waitstop(struct s32k1xx_lpi2c_priv_s *priv);
 
 #ifdef CONFIG_I2C_TRACE
 static void s32k1xx_lpi2c_tracereset(struct s32k1xx_lpi2c_priv_s *priv);
@@ -632,95 +630,6 @@ s32k1xx_lpi2c_sem_waitdone(struct s32k1xx_lpi2c_priv_s *priv)
 }
 #endif
 
-/****************************************************************************
- * Name: s32k1xx_lpi2c_sem_waitstop
- *
- * Description:
- *   Wait for a STOP to complete
- *
- ****************************************************************************/
-
-static inline void
-s32k1xx_lpi2c_sem_waitstop(struct s32k1xx_lpi2c_priv_s *priv)
-{
-  clock_t start;
-  clock_t elapsed;
-  clock_t timeout;
-  uint32_t regval;
-
-  /* Select a timeout */
-
-#ifdef CONFIG_S32K1XX_I2C_DYNTIMEO
-  timeout = USEC2TICK(CONFIG_S32K1XX_I2C_DYNTIMEO_STARTSTOP);
-#else
-  timeout = CONFIG_S32K1XX_I2CTIMEOTICKS;
-#endif
-
-  /* Wait as stop might still be in progress; but stop might also
-   * be set because of a timeout error: "The [STOP] bit is set and
-   * cleared by software, cleared by hardware when a Stop condition is
-   * detected, set by hardware when a timeout error is detected."
-   */
-
-  start = clock_systime_ticks();
-  do
-    {
-      /* Calculate the elapsed time */
-
-      elapsed = clock_systime_ticks() - start;
-
-      /* Check for STOP condition */
-
-      if (priv->config->mode == LPI2C_MASTER)
-        {
-          regval = s32k1xx_lpi2c_getreg(priv, S32K1XX_LPI2C_MSR_OFFSET);
-          if ((regval & LPI2C_MSR_SDF) == LPI2C_MSR_SDF)
-            {
-              return;
-            }
-        }
-
-      /* Enable Interrupts when slave mode */
-
-      else
-        {
-          regval = s32k1xx_lpi2c_getreg(priv, S32K1XX_LPI2C_SSR_OFFSET);
-          if ((regval & LPI2C_SSR_SDF) == LPI2C_SSR_SDF)
-            {
-              return;
-            }
-        }
-
-      /* Check for NACK error */
-
-      if (priv->config->mode == LPI2C_MASTER)
-        {
-          regval = s32k1xx_lpi2c_getreg(priv, S32K1XX_LPI2C_MSR_OFFSET);
-          if ((regval & LPI2C_MSR_NDF) == LPI2C_MSR_NDF)
-            {
-              return;
-            }
-        }
-
-      /* Enable Interrupts when slave mode */
-
-      else
-        {
-#warning Missing logic for I2C Slave
-        }
-    }
-
-  /* Loop until the stop is complete or a timeout occurs. */
-
-  while (elapsed < timeout);
-
-  /* If we get here then a timeout occurred with the STOP condition
-   * still pending.
-   */
-
-  i2cinfo("Timeout with Status Register: %" PRIx32 "\n", regval);
-}
-
 /****************************************************************************
  * Name: s32k1xx_rxdma_callback
  *


[incubator-nuttx] 14/18: Fix chip/sam_serial.c:900:20: error: unused function 'sam_restoreusartint' [-Werror,-Wunused-function]

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 94655e95ea7102deb1edad709e93e950a69a1b88
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 17:00:31 2022 +0800

    Fix chip/sam_serial.c:900:20: error: unused function 'sam_restoreusartint' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/samv7/sam_serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/samv7/sam_serial.c b/arch/arm/src/samv7/sam_serial.c
index c464d94ef1..b6cc019642 100644
--- a/arch/arm/src/samv7/sam_serial.c
+++ b/arch/arm/src/samv7/sam_serial.c
@@ -897,6 +897,7 @@ static inline void sam_serialout(struct sam_dev_s *priv, int offset,
  * Name: sam_restoreusartint
  ****************************************************************************/
 
+#ifdef CONFIG_SERIAL_TERMIOS
 static inline void sam_restoreusartint(struct sam_dev_s *priv, uint32_t imr)
 {
   /* Restore the previous interrupt state (assuming all interrupts
@@ -905,6 +906,7 @@ static inline void sam_restoreusartint(struct sam_dev_s *priv, uint32_t imr)
 
   sam_serialout(priv, SAM_UART_IER_OFFSET, imr);
 }
+#endif
 
 /****************************************************************************
  * Name: sam_disableallints


[incubator-nuttx] 10/18: Fix Error: armv8-m/arm_cache.c:93:24: error: unused function 'arm_clz' [-Werror,-Wunused-function]

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 29c46d873404627c0a57a672cc4e08a370322c59
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:07:42 2022 +0800

    Fix Error: armv8-m/arm_cache.c:93:24: error: unused function 'arm_clz' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/armv8-m/arm_cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/armv8-m/arm_cache.c b/arch/arm/src/armv8-m/arm_cache.c
index dde0d71daa..543d4b9049 100644
--- a/arch/arm/src/armv8-m/arm_cache.c
+++ b/arch/arm/src/armv8-m/arm_cache.c
@@ -90,6 +90,7 @@
  *
  ****************************************************************************/
 
+#ifdef CONFIG_ARMV8M_DCACHE
 static inline uint32_t arm_clz(unsigned int value)
 {
   uint32_t ret;
@@ -97,6 +98,7 @@ static inline uint32_t arm_clz(unsigned int value)
   __asm__ __volatile__ ("clz %0, %1" : "=r"(ret) : "r"(value));
   return ret;
 }
+#endif
 
 /****************************************************************************
  * Public Functions


[incubator-nuttx] 12/18: Fix Error: chip/s32k1xx_lpspi.c:581:9: error: unused function 's32k1xx_lpspi_[write|read]byte'

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 e0f1c4169522a352078cf26d696f5a1326f95164
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 15:36:33 2022 +0800

    Fix Error: chip/s32k1xx_lpspi.c:581:9: error: unused function 's32k1xx_lpspi_[write|read]byte'
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/s32k1xx/s32k1xx_lpspi.c | 101 -----------------------------------
 1 file changed, 101 deletions(-)

diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
index 6b02673bd8..a80636d368 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
@@ -380,47 +380,6 @@ static  struct pm_callback_s g_spi1_pmcb =
  * Private Functions
  ****************************************************************************/
 
-/****************************************************************************
- * Name: s32k1xx_lpspi_getreg8
- *
- * Description:
- *   Get the contents of the SPI register at offset
- *
- * Input Parameters:
- *   priv   - private SPI device structure
- *   offset - offset to the register of interest
- *
- * Returned Value:
- *   The contents of the 8-bit register
- *
- ****************************************************************************/
-
-static inline
-uint8_t s32k1xx_lpspi_getreg8(struct s32k1xx_lpspidev_s *priv,
-                              uint8_t offset)
-{
-  return getreg8(priv->spibase + offset);
-}
-
-/****************************************************************************
- * Name: s32k1xx_lpspi_putreg8
- *
- * Description:
- *   Write a 8-bit value to the SPI register at offset
- *
- * Input Parameters:
- *   priv   - private SPI device structure
- *   offset - offset to the register of interest
- *   value  - the 8-bit value to be written
- *
- ****************************************************************************/
-
-static inline void s32k1xx_lpspi_putreg8(struct s32k1xx_lpspidev_s *priv,
-                                         uint8_t offset, uint8_t value)
-{
-  putreg8(value, priv->spibase + offset);
-}
-
 /****************************************************************************
  * Name: s32k1xx_lpspi_getreg
  *
@@ -563,66 +522,6 @@ static inline void s32k1xx_lpspi_write_dword(struct s32k1xx_lpspidev_s
 
 #endif
 
-/****************************************************************************
- * Name: s32k1xx_lpspi_readbyte
- *
- * Description:
- *   Read one byte from SPI
- *
- * Input Parameters:
- *   priv - Device-specific state data
- *
- * Returned Value:
- *   Byte as read
- *
- ****************************************************************************/
-
-static inline
-uint8_t s32k1xx_lpspi_readbyte(struct s32k1xx_lpspidev_s *priv)
-{
-  /* Wait until the receive buffer is not empty */
-
-  while ((s32k1xx_lpspi_getreg32(priv, S32K1XX_LPSPI_SR_OFFSET) &
-          LPSPI_SR_RDF) == 0)
-    {
-    }
-
-  /* Then return the received byte */
-
-  return s32k1xx_lpspi_getreg8(priv, S32K1XX_LPSPI_RDR_OFFSET);
-}
-
-/****************************************************************************
- * Name: s32k1xx_lpspi_writebyte
- *
- * Description:
- *   Write one 8-bit frame to the SPI FIFO
- *
- * Input Parameters:
- *   priv - Device-specific state data
- *   byte - Byte to send
- *
- * Returned Value:
- *   None
- *
- ****************************************************************************/
-
-static inline
-void s32k1xx_lpspi_writebyte(struct s32k1xx_lpspidev_s *priv,
-                             uint8_t byte)
-{
-  /* Wait until the transmit buffer is empty */
-
-  while ((s32k1xx_lpspi_getreg32(priv, S32K1XX_LPSPI_SR_OFFSET) &
-          LPSPI_SR_TDF) == 0)
-    {
-    }
-
-  /* Then send the byte */
-
-  s32k1xx_lpspi_putreg8(priv, S32K1XX_LPSPI_TDR_OFFSET, byte);
-}
-
 /****************************************************************************
  * Name: s32k1xx_lpspi_9to16bitmode
  *


[incubator-nuttx] 09/18: Fix Error: chip/nuc_timerisr.c:105:20: error: unused function 'nuc_unlock' [-Werror,-Wunused-function]

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 492da4d56dc00f0572ee66b9a7e0b517ce9979c3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:05:37 2022 +0800

    Fix Error: chip/nuc_timerisr.c:105:20: error: unused function 'nuc_unlock' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/nuc1xx/nuc_timerisr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/nuc1xx/nuc_timerisr.c b/arch/arm/src/nuc1xx/nuc_timerisr.c
index b6eff265c6..d80f14d082 100644
--- a/arch/arm/src/nuc1xx/nuc_timerisr.c
+++ b/arch/arm/src/nuc1xx/nuc_timerisr.c
@@ -101,7 +101,7 @@
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NUC_SYSTICK_CORECLK
+#ifndef CONFIG_NUC_SYSTICK_CORECLK
 static inline void nuc_unlock(void)
 {
   putreg32(0x59, NUC_GCR_REGWRPROT);
@@ -124,7 +124,7 @@ static inline void nuc_unlock(void)
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NUC_SYSTICK_CORECLK
+#ifndef CONFIG_NUC_SYSTICK_CORECLK
 static inline void nuc_lock(void)
 {
   putreg32(0, NUC_GCR_REGWRPROT);


[incubator-nuttx] 16/18: Fix Error: chip/sam_afec.c:546:22: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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 677932293b05e5aab81a458f0c5646e62c1bbbc9
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 18:43:18 2022 +0800

    Fix Error: chip/sam_afec.c:546:22: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/sama5/sam_adc.c  | 2 +-
 arch/arm/src/samv7/sam_afec.c | 2 +-
 arch/arm/src/samv7/sam_dac.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c
index 965377194f..8ad945879c 100644
--- a/arch/arm/src/sama5/sam_adc.c
+++ b/arch/arm/src/sama5/sam_adc.c
@@ -1326,7 +1326,7 @@ static int sam_adc_settimer(struct sam_adc_s *priv, uint32_t frequency,
   priv->tc = sam_tc_allocate(channel, mode);
   if (!priv->tc)
     {
-      aerr("ERROR: Failed to allocate channel %d mode %08x\n",
+      aerr("ERROR: Failed to allocate channel %d mode %08" PRIx32 "\n",
             channel, mode);
       return -EINVAL;
     }
diff --git a/arch/arm/src/samv7/sam_afec.c b/arch/arm/src/samv7/sam_afec.c
index 62aa1ea86f..c18ba5cfea 100644
--- a/arch/arm/src/samv7/sam_afec.c
+++ b/arch/arm/src/samv7/sam_afec.c
@@ -542,7 +542,7 @@ static int sam_afec_settimer(struct samv7_dev_s *priv, uint32_t frequency,
   priv->tc = sam_tc_allocate(channel, mode);
   if (!priv->tc)
     {
-      aerr("ERROR: Failed to allocate channel %d mode %08lx\n",
+      aerr("ERROR: Failed to allocate channel %d mode %08" PRIx32 "\n",
             channel, mode);
       return -EINVAL;
     }
diff --git a/arch/arm/src/samv7/sam_dac.c b/arch/arm/src/samv7/sam_dac.c
index 73dfdc3a4c..f67d57a6bb 100644
--- a/arch/arm/src/samv7/sam_dac.c
+++ b/arch/arm/src/samv7/sam_dac.c
@@ -388,7 +388,7 @@ static int dac_timer_init(struct sam_dac_s *priv, uint32_t freq_required,
   priv->tc = sam_tc_allocate(channel, mode);
   if (!priv->tc)
     {
-      aerr("ERROR: Failed to allocate channel %d mode %08x\n",
+      aerr("ERROR: Failed to allocate channel %d mode %08" PRIx32 "\n",
             channel, mode);
       return -EINVAL;
     }


[incubator-nuttx] 18/18: Fix Error: wireless/ieee802154/mrf24j40/mrf24j40_radif.c:138:45: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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 b44e74348346cc6244fcfe17fbc4a7e818ebce20
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 18:46:44 2022 +0800

    Fix Error: wireless/ieee802154/mrf24j40/mrf24j40_radif.c:138:45: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/wireless/ieee802154/mrf24j40/mrf24j40_radif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_radif.c b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_radif.c
index 802ce8ec6e..d9ae37d9a7 100644
--- a/drivers/wireless/ieee802154/mrf24j40/mrf24j40_radif.c
+++ b/drivers/wireless/ieee802154/mrf24j40/mrf24j40_radif.c
@@ -135,7 +135,7 @@ static void mrf24j40_setorder(FAR struct mrf24j40_radio_s *dev, uint8_t bo,
           remcnt  = (bi - (maincnt * dev->slpclkper)) / 50;
         }
 
-      wlinfo("MAINCNT: %lu, REMCNT: %lu\n", maincnt, remcnt);
+      wlinfo("MAINCNT: %" PRIu32 ", REMCNT: %" PRIu32 "\n", maincnt, remcnt);
 
       /* Program the Main Counter, MAINCNT (0x229<1:0>, 0x228, 0x227,
        * 0x226), and Remain Counter, REMCNT (0x225, 0x224), according to BO


[incubator-nuttx] 17/18: Fix Error: chip/sam_tc.c:922:30: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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 c741b7b586223873c3cc29f8b2f50cf10aac2217
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 18:44:21 2022 +0800

    Fix Error: chip/sam_tc.c:922:30: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/samv7/sam_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/samv7/sam_tc.c b/arch/arm/src/samv7/sam_tc.c
index c40713902e..ca68a9b86a 100644
--- a/arch/arm/src/samv7/sam_tc.c
+++ b/arch/arm/src/samv7/sam_tc.c
@@ -919,7 +919,7 @@ static int sam_tc_mcksrc(uint32_t frequency, uint32_t *tcclks,
   uint32_t fnext;
   int ndx = 0;
 
-  tmrinfo("frequency=%ld\n", frequency);
+  tmrinfo("frequency=%" PRId32 "\n", frequency);
 
   /* Satisfy lower bound.  That is, the value of the divider such that:
    *