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

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

commit ed5592b076b97387274cf2c712619289b7329e41
Author: yangsong8 <[email protected]>
AuthorDate: Tue Nov 10 10:28:19 2026 +0800

    nuttx: fix the nxstyle errors in 15 files
    
    Fix the existing nxstyle errors reported for the whole file in the files
    touched by the following include changes: indent the case labels of the
    switch statements, fix the alignment of the statements under the case
    labels, add the missing braces and the missing blank lines after
    declarations, and wrap the lines that become too long. No functional
    change.
    
    Signed-off-by: yangsong8 <[email protected]>
---
 arch/arm/src/gd32f4/gd32f4xx_syscfg.c              |  39 +-
 arch/arm/src/mx8mp/mx8mp_i2c.c                     |  44 ++-
 arch/arm/src/samv7/sam_xdmac.c                     |   1 +
 arch/risc-v/src/bl602/bl602_dma.c                  |   7 +-
 arch/risc-v/src/common/espressif/esp_crypto.c      |  28 +-
 arch/risc-v/src/esp32c3-legacy/esp32c3_crypto.c    |  10 +-
 arch/xtensa/src/common/espressif/esp_crypto.c      |  30 +-
 arch/xtensa/src/esp32/esp32_crypto.c               |  48 ++-
 .../stm32h7/linum-stm32h753bi/src/stm32_bringup.c  |   1 +
 drivers/efuse/efuse.c                              | 156 ++++----
 drivers/lcd/lcd_dev.c                              | 429 +++++++++++----------
 drivers/usbdev/rndis.c                             | 290 +++++++-------
 drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c  |   3 +-
 net/nat/nat.c                                      |   4 +-
 net/utils/net_bufpool.c                            |   1 +
 15 files changed, 558 insertions(+), 533 deletions(-)

diff --git a/arch/arm/src/gd32f4/gd32f4xx_syscfg.c 
b/arch/arm/src/gd32f4/gd32f4xx_syscfg.c
index 8e68a901a5a..42c0f8dda91 100644
--- a/arch/arm/src/gd32f4/gd32f4xx_syscfg.c
+++ b/arch/arm/src/gd32f4/gd32f4xx_syscfg.c
@@ -74,6 +74,7 @@ void gd32_syscfg_bootmode_config(uint8_t syscfg_bootmode)
 void gd32_syscfg_fmc_swap_config(uint32_t syscfg_fmc_swap)
 {
   uint32_t regval;
+
   regval = getreg32(GD32_SYSCFG_CFG0);
   regval &= ~SYSCFG_CFG0_FMC_SWP_MASK;
   regval |= syscfg_fmc_swap;
@@ -113,32 +114,32 @@ void gd32_syscfg_exti_line_config(uint8_t exti_port, 
uint8_t exti_pin)
 
   switch (exti_pin / SYSCFG_EXTI_SS_JSTEP)
     {
-    /* EXTI source line(0..3) */
+      /* EXTI source line(0..3) */
 
-    case SYSCFG_EXTISS0:
-      regaddr = GD32_SYSCFG_EXTISS0;
-      break;
+      case SYSCFG_EXTISS0:
+        regaddr = GD32_SYSCFG_EXTISS0;
+        break;
 
-    /* EXTI source line(4..7) */
+      /* EXTI source line(4..7) */
 
-    case SYSCFG_EXTISS1:
-      regaddr = GD32_SYSCFG_EXTISS1;
-      break;
+      case SYSCFG_EXTISS1:
+        regaddr = GD32_SYSCFG_EXTISS1;
+        break;
 
-    /* EXTI source line(8..11) */
+      /* EXTI source line(8..11) */
 
-    case SYSCFG_EXTISS2:
-      regaddr = GD32_SYSCFG_EXTISS2;
-      break;
+      case SYSCFG_EXTISS2:
+        regaddr = GD32_SYSCFG_EXTISS2;
+        break;
 
-    /* EXTI source line(12..15) */
+      /* EXTI source line(12..15) */
 
-    case SYSCFG_EXTISS3:
-      regaddr = GD32_SYSCFG_EXTISS3;
-      break;
-    default:
-      DEBUGASSERT(false);
-      break;
+      case SYSCFG_EXTISS3:
+        regaddr = GD32_SYSCFG_EXTISS3;
+        break;
+      default:
+        DEBUGASSERT(false);
+        break;
     }
 
   regval = getreg32(regaddr);
diff --git a/arch/arm/src/mx8mp/mx8mp_i2c.c b/arch/arm/src/mx8mp/mx8mp_i2c.c
index 80c7ff7d5e5..a006ad26140 100644
--- a/arch/arm/src/mx8mp/mx8mp_i2c.c
+++ b/arch/arm/src/mx8mp/mx8mp_i2c.c
@@ -518,6 +518,7 @@ static void mx8mp_i2c_set_frequency(struct mx8mp_i2c_s 
*priv,
   for (i = 0; i < 0x40; ++i)
     {
       uint32_t current_frequency = clock / DIVIDERS_MAP[i];
+
       if ((current_frequency <= frequency) &&
           (current_frequency > old_frequency))
         {
@@ -559,6 +560,7 @@ static void mx8mp_i2c_reset_bus(struct mx8mp_i2c_s *priv)
 static int mx8mp_i2c_interrupt(int irq, void *context, void *arg)
 {
   struct mx8mp_i2c_s *priv = (struct mx8mp_i2c_s *)arg;
+
   modreg16(0, I2SR_IIF, priv->base + I2SR_OFFSET);
   nxsem_post(&priv->wait);
 
@@ -735,44 +737,44 @@ struct i2c_master_s *mx8mp_i2cbus_initialize(int port)
   switch (port)
     {
 #ifdef CONFIG_MX8MP_I2C1
-    case 1:
-      priv = &g_i2c1_dev;
-      break;
+      case 1:
+        priv = &g_i2c1_dev;
+        break;
 #endif
 
 #ifdef CONFIG_MX8MP_I2C2
-    case 2:
-      priv = &g_i2c2_dev;
-      break;
+      case 2:
+        priv = &g_i2c2_dev;
+        break;
 #endif
 
 #ifdef CONFIG_MX8MP_I2C3
-    case 3:
-      priv = &g_i2c3_dev;
-      break;
+      case 3:
+        priv = &g_i2c3_dev;
+        break;
 #endif
 
 #ifdef CONFIG_MX8MP_I2C4
-    case 4:
-      priv = &g_i2c4_dev;
-      break;
+      case 4:
+        priv = &g_i2c4_dev;
+        break;
 #endif
 
 #ifdef CONFIG_MX8MP_I2C5
-    case 5:
-      priv = &g_i2c5_dev;
-      break;
+      case 5:
+        priv = &g_i2c5_dev;
+        break;
 #endif
 
 #ifdef CONFIG_MX8MP_I2C6
-    case 6:
-      priv = &g_i2c6_dev;
-      break;
+      case 6:
+        priv = &g_i2c6_dev;
+        break;
 #endif
 
-    default:
-      i2cerr("ERROR: Unsupported I2C port %d\n", port);
-      return NULL;
+      default:
+        i2cerr("ERROR: Unsupported I2C port %d\n", port);
+        return NULL;
     }
 
   nxmutex_lock(&priv->lock);
diff --git a/arch/arm/src/samv7/sam_xdmac.c b/arch/arm/src/samv7/sam_xdmac.c
index 3ac58eec5bc..a0017db1357 100644
--- a/arch/arm/src/samv7/sam_xdmac.c
+++ b/arch/arm/src/samv7/sam_xdmac.c
@@ -1630,6 +1630,7 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t 
chflags)
   for (chndx = 0; chndx < SAMV7_NDMACHAN; chndx++)
     {
       struct sam_xdmach_s *candidate = &g_xdmach[chndx];
+
       if (!candidate->inuse)
         {
           xdmach        = candidate;
diff --git a/arch/risc-v/src/bl602/bl602_dma.c 
b/arch/risc-v/src/bl602/bl602_dma.c
index 36ee384b117..c5c753bd7f5 100644
--- a/arch/risc-v/src/bl602/bl602_dma.c
+++ b/arch/risc-v/src/bl602/bl602_dma.c
@@ -190,6 +190,7 @@ int8_t bl602_dma_channel_request(bl602_dma_callback_t 
callback, void *arg)
   for (ch = 0, dmach = NULL; ch < BL602_DMA_NCHANNELS; ch++)
     {
       struct dma_channel_s *candidate = &g_dmach[ch];
+
       if (!candidate->inuse)
         {
           dmainfo("DMA Channel %u assigned.\n", ch);
@@ -349,9 +350,9 @@ void weak_function riscv_dma_initialize(void)
 {
   uint8_t ch;
 
-  #ifdef CONFIG_DEBUG_DMA_INFO
-    struct bl602_dmaregs_s regs;
-  #endif
+#ifdef CONFIG_DEBUG_DMA_INFO
+  struct bl602_dmaregs_s regs;
+#endif
 
   dmainfo("Initialize DMA\n");
 
diff --git a/arch/risc-v/src/common/espressif/esp_crypto.c 
b/arch/risc-v/src/common/espressif/esp_crypto.c
index 4e1527561fd..a46e4140473 100644
--- a/arch/risc-v/src/common/espressif/esp_crypto.c
+++ b/arch/risc-v/src/common/espressif/esp_crypto.c
@@ -480,9 +480,9 @@ static int authcompute(struct cryptop *crp, struct 
cryptodesc *crd,
             return -EINVAL;
           }
 
-          axf->final(aalg, data->hw_ictx);
-          axf->update(data->hw_octx, aalg, axf->hashsize);
-          axf->final(aalg, data->hw_octx);
+        axf->final(aalg, data->hw_ictx);
+        axf->update(data->hw_octx, aalg, axf->hashsize);
+        axf->final(aalg, data->hw_octx);
 
         break;
     }
@@ -575,7 +575,7 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
         {
 #ifdef CONFIG_CRYPTO_AES
           case CRYPTO_AES_CBC:
-              break;
+            break;
 
           case CRYPTO_AES_CTR:
             if ((cri->cri_klen / 8 - 4) != 16 &&
@@ -605,15 +605,15 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
             goto sha_common;
 #endif
             sha_common:
-              data->hw_ictx = kmm_malloc(axf->ctxsize);
-              if (data->hw_ictx == NULL)
-                {
-                  kmm_free(data);
-                  return -ENOBUFS;
-                }
-
-              axf->init(data->hw_ictx);
-              data->hw_axf = axf;
+            data->hw_ictx = kmm_malloc(axf->ctxsize);
+            if (data->hw_ictx == NULL)
+              {
+                kmm_free(data);
+                return -ENOBUFS;
+              }
+
+            axf->init(data->hw_ictx);
+            data->hw_axf = axf;
             break;
           case CRYPTO_SHA1_HMAC:
             axf = &g_auth_hash_hmac_sha1_esp;
@@ -626,7 +626,7 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
             axf = &g_auth_hash_hmac_sha512_esp;
             goto hmac_common;
 #endif
-          hmac_common:
+            hmac_common:
             data->hw_ictx = kmm_malloc(axf->ctxsize);
             if (data->hw_ictx == NULL)
               {
diff --git a/arch/risc-v/src/esp32c3-legacy/esp32c3_crypto.c 
b/arch/risc-v/src/esp32c3-legacy/esp32c3_crypto.c
index 8dd1dfecf49..418d93d3868 100644
--- a/arch/risc-v/src/esp32c3-legacy/esp32c3_crypto.c
+++ b/arch/risc-v/src/esp32c3-legacy/esp32c3_crypto.c
@@ -180,9 +180,9 @@ static int authcompute(struct cryptop *crp, struct 
cryptodesc *crd,
             return -EINVAL;
           }
 
-          axf->final(aalg, data->hw_ictx);
-          axf->update(data->hw_octx, aalg, axf->hashsize);
-          axf->final(aalg, data->hw_octx);
+        axf->final(aalg, data->hw_ictx);
+        axf->update(data->hw_octx, aalg, axf->hashsize);
+        axf->final(aalg, data->hw_octx);
 
         break;
     }
@@ -267,7 +267,7 @@ static int esp32c3_newsession(uint32_t *sid, struct 
cryptoini *cri)
       switch (cri->cri_alg)
         {
           case CRYPTO_AES_CBC:
-              break;
+            break;
           case CRYPTO_AES_CTR:
             if ((cri->cri_klen / 8 - 4) != 16 &&
                 (cri->cri_klen / 8 -4) != 32)
@@ -286,7 +286,7 @@ static int esp32c3_newsession(uint32_t *sid, struct 
cryptoini *cri)
           case CRYPTO_SHA2_256_HMAC:
             axf = &g_auth_hash_hmac_sha256_esp32c3;
             goto common;
-          common:
+            common:
             data->hw_ictx = kmm_malloc(axf->ctxsize);
             if (data->hw_ictx == NULL)
               {
diff --git a/arch/xtensa/src/common/espressif/esp_crypto.c 
b/arch/xtensa/src/common/espressif/esp_crypto.c
index 4643ea654fb..f0e51ac28bf 100644
--- a/arch/xtensa/src/common/espressif/esp_crypto.c
+++ b/arch/xtensa/src/common/espressif/esp_crypto.c
@@ -481,9 +481,9 @@ static int authcompute(struct cryptop *crp, struct 
cryptodesc *crd,
             return -EINVAL;
           }
 
-          axf->final(aalg, data->hw_ictx);
-          axf->update(data->hw_octx, aalg, axf->hashsize);
-          axf->final(aalg, data->hw_octx);
+        axf->final(aalg, data->hw_ictx);
+        axf->update(data->hw_octx, aalg, axf->hashsize);
+        axf->final(aalg, data->hw_octx);
 
         break;
     }
@@ -576,7 +576,7 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
         {
 #ifdef CONFIG_CRYPTO_AES
           case CRYPTO_AES_CBC:
-              break;
+            break;
 
           case CRYPTO_AES_CTR:
             if ((cri->cri_klen / 8 - 4) != 16 &&
@@ -603,16 +603,16 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
           case CRYPTO_SHA2_512:
             axf = &g_auth_hash_sha512_esp;
             goto sha_common;
-          sha_common:
-              data->hw_ictx = kmm_malloc(axf->ctxsize);
-              if (data->hw_ictx == NULL)
-                {
-                  kmm_free(data);
-                  return -ENOBUFS;
-                }
-
-              axf->init(data->hw_ictx);
-              data->hw_axf = axf;
+            sha_common:
+            data->hw_ictx = kmm_malloc(axf->ctxsize);
+            if (data->hw_ictx == NULL)
+              {
+                kmm_free(data);
+                return -ENOBUFS;
+              }
+
+            axf->init(data->hw_ictx);
+            data->hw_axf = axf;
             break;
           case CRYPTO_SHA1_HMAC:
             axf = &g_auth_hash_hmac_sha1_esp;
@@ -626,7 +626,7 @@ static int esp_newsession(uint32_t *sid, struct cryptoini 
*cri)
           case CRYPTO_SHA2_512_HMAC:
             axf = &g_auth_hash_hmac_sha512_esp;
             goto hmac_common;
-          hmac_common:
+            hmac_common:
             data->hw_ictx = kmm_malloc(axf->ctxsize);
             if (data->hw_ictx == NULL)
               {
diff --git a/arch/xtensa/src/esp32/esp32_crypto.c 
b/arch/xtensa/src/esp32/esp32_crypto.c
index da14dc56f9a..eb7f62ee931 100644
--- a/arch/xtensa/src/esp32/esp32_crypto.c
+++ b/arch/xtensa/src/esp32/esp32_crypto.c
@@ -343,21 +343,21 @@ static int authcompute(struct cryptop *crp, struct 
cryptodesc *crd,
             return -EINVAL;
           }
 
-          axf->final(aalg, data->hw_ictx);
+        axf->final(aalg, data->hw_ictx);
 
-          for (int k = 0; k < crd->crd_klen / 8; k++)
+        for (int k = 0; k < crd->crd_klen / 8; k++)
           {
             crd->crd_key[k] ^= HMAC_OPAD_VAL;
           }
 
-          axf->update(data->hw_octx, (uint8_t *)crd->crd_key,
-                      crd->crd_klen / 8);
+        axf->update(data->hw_octx, (uint8_t *)crd->crd_key,
+                    crd->crd_klen / 8);
 
-          axf->update(data->hw_octx, hmac_opad_buffer,
-                      axf->blocksize - (crd->crd_klen / 8));
+        axf->update(data->hw_octx, hmac_opad_buffer,
+                    axf->blocksize - (crd->crd_klen / 8));
 
-          axf->update(data->hw_octx, aalg, axf->hashsize);
-          axf->final(aalg, data->hw_octx);
+        axf->update(data->hw_octx, aalg, axf->hashsize);
+        axf->final(aalg, data->hw_octx);
 
         break;
     }
@@ -377,7 +377,9 @@ static void esp32_pbkdf2_rekey(struct esp32_crypto_data 
*data,
 
   memcpy(keybuf, key, klen);
   for (k = 0; k < klen; k++)
-    keybuf[k] ^= HMAC_IPAD_VAL;
+    {
+      keybuf[k] ^= HMAC_IPAD_VAL;
+    }
 
   axf->init(data->hw_ictx);
   axf->update(data->hw_ictx, keybuf, klen);
@@ -439,10 +441,13 @@ int esp32_pbkdf2(struct cryptop *crp,
           memcpy(U, macbuf, axf->hashsize);
 
           for (j = 0; j < axf->hashsize; j++)
-            T[j] ^= U[j];
+            {
+              T[j] ^= U[j];
+            }
         }
 
       size_t tocopy = MIN(crp->crp_olen - generated, axf->hashsize);
+
       memcpy(crp->crp_mac + generated, T, tocopy);
       generated += tocopy;
     }
@@ -549,15 +554,15 @@ static int esp32_newsession(uint32_t *sid, struct 
cryptoini *cri)
             axf = &g_auth_hash_sha2_512_esp32;
             goto common;
             common:
-              data->hw_ictx = kmm_malloc(axf->ctxsize);
-              if (data->hw_ictx == NULL)
-                {
-                  kmm_free(data);
-                  return -ENOBUFS;
-                }
-
-              axf->init(data->hw_ictx);
-              data->hw_axf = axf;
+            data->hw_ictx = kmm_malloc(axf->ctxsize);
+            if (data->hw_ictx == NULL)
+              {
+                kmm_free(data);
+                return -ENOBUFS;
+              }
+
+            axf->init(data->hw_ictx);
+            data->hw_axf = axf;
             break;
           case CRYPTO_SHA1_HMAC:
           case CRYPTO_PBKDF2_HMAC_SHA1:
@@ -567,7 +572,7 @@ static int esp32_newsession(uint32_t *sid, struct cryptoini 
*cri)
           case CRYPTO_PBKDF2_HMAC_SHA256:
             axf = &g_auth_hash_hmac_sha256_esp32;
             goto common__hmac;
-          common__hmac:
+            common__hmac:
             data->hw_ictx = kmm_malloc(axf->ctxsize);
             if (data->hw_ictx == NULL)
               {
@@ -721,6 +726,7 @@ static int esp32_process(struct cryptop *crp)
   uint8_t iv[AESCTR_BLOCKSIZE];
   uint32_t lid;
   int err = 0;
+
   lid = crp->crp_sid & 0xffffffff;
 
   /* Go through crypto descriptors, processing as we go */
@@ -791,7 +797,7 @@ static int esp32_process(struct cryptop *crp)
           case CRYPTO_PBKDF2_HMAC_SHA256:
             esp32_pbkdf2(crp, crd, data, crp->crp_buf);
 
-          break;
+            break;
           default:
             return -EINVAL;
         }
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c 
b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
index c6b72084e0f..d70f541ec51 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
@@ -327,6 +327,7 @@ int stm32_bringup(void)
 
 #if defined(CONFIG_RNDIS) && !defined(CONFIG_RNDIS_COMPOSITE)
   uint8_t mac[6];
+
   mac[0] = 0xa0;
   mac[1] = (CONFIG_NETINIT_MACADDR_2 >> (8 * 0)) & 0xff;
   mac[2] = (CONFIG_NETINIT_MACADDR_1 >> (8 * 3)) & 0xff;
diff --git a/drivers/efuse/efuse.c b/drivers/efuse/efuse.c
index 29afbe71801..572225df04b 100644
--- a/drivers/efuse/efuse.c
+++ b/drivers/efuse/efuse.c
@@ -156,84 +156,84 @@ static int efuse_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
 
   switch (cmd)
     {
-    /* cmd:         EFUSEIOC_READ_FIELD
-     * Description: Read a field
-     * Argument:    A pointer to a struct efuse_param.
-     *              Where the field is an array.
-     *              Each item in the array is a pointer to an efuse_desc_t
-     *              variable.
-     *              An efuse_desc_t variable contains an offset to a field
-     *              or subfield and its size in bits.
-     *              The size param is a redundancy, and it is the sum
-     *              of all subfields sizes from efuse_desc_t in bits.
-     *              The data is a pointer to a pre-allocated space
-     *              where the driver will load the data read from efuse.
-     */
-
-    case EFUSEIOC_READ_FIELD:
-      {
-        FAR struct efuse_param_s *param =
-                   (FAR struct efuse_param_s *)((uintptr_t)arg);
-
-        /* Read the efuse */
-
-        DEBUGASSERT(lower->ops->read_field); /* Required */
-        ret = lower->ops->read_field(lower,
-                                     param->field,
-                                     param->data,
-                                     param->size);
-      }
-      break;
-
-    /* cmd:         EFUSEIOC_WRITE_FIELD
-     * Description: Write a field
-     * Argument: A pointer to a struct efuse_param.
-     *           Where the field is an array.
-     *           Each item in the array is a pointer to an efuse_desc_t
-     *           variable.
-     *           An efuse_desc_t variable contains an offset to a field
-     *           or subfield and its size in bits.
-     *           The size param is a redundancy, and it is the sum
-     *           of all subfields sizes from efuse_desc_t in bits.
-     *           The data is a pointer to a pre-allocated space
-     *           where the user wrote the value that he wants
-     *           to write in a field or subfield.
-     */
-
-    case EFUSEIOC_WRITE_FIELD:
-      {
-        FAR struct efuse_param_s *param =
-                   (FAR struct efuse_param_s *)((uintptr_t)arg);
-
-        /* Write the efuse */
-
-        DEBUGASSERT(lower->ops->write_field); /* Required */
-        ret = lower->ops->write_field(lower,
-                                      param->field,
-                                      param->data,
-                                      param->size);
-      }
-      break;
-
-    default:
-      {
-        minfo("Forwarding unrecognized cmd: %d arg: %lu\n", cmd, arg);
-
-        /* Ioctls commands that are not recognized by the "upper-half"
-         * driver are forwarded to the lower half driver through this
-         * method.
-         */
-
-        if (lower->ops->ioctl) /* Optional */
-          {
-            ret = lower->ops->ioctl(lower, cmd, arg);
-          }
-        else
-          {
-            ret = -ENOTTY;
-          }
-      }
-      break;
+      /* cmd:         EFUSEIOC_READ_FIELD
+       * Description: Read a field
+       * Argument:    A pointer to a struct efuse_param.
+       *              Where the field is an array.
+       *              Each item in the array is a pointer to an efuse_desc_t
+       *              variable.
+       *              An efuse_desc_t variable contains an offset to a field
+       *              or subfield and its size in bits.
+       *              The size param is a redundancy, and it is the sum
+       *              of all subfields sizes from efuse_desc_t in bits.
+       *              The data is a pointer to a pre-allocated space
+       *              where the driver will load the data read from efuse.
+       */
+
+      case EFUSEIOC_READ_FIELD:
+        {
+          FAR struct efuse_param_s *param =
+                     (FAR struct efuse_param_s *)((uintptr_t)arg);
+
+          /* Read the efuse */
+
+          DEBUGASSERT(lower->ops->read_field); /* Required */
+          ret = lower->ops->read_field(lower,
+                                       param->field,
+                                       param->data,
+                                       param->size);
+        }
+        break;
+
+      /* cmd:         EFUSEIOC_WRITE_FIELD
+       * Description: Write a field
+       * Argument: A pointer to a struct efuse_param.
+       *           Where the field is an array.
+       *           Each item in the array is a pointer to an efuse_desc_t
+       *           variable.
+       *           An efuse_desc_t variable contains an offset to a field
+       *           or subfield and its size in bits.
+       *           The size param is a redundancy, and it is the sum
+       *           of all subfields sizes from efuse_desc_t in bits.
+       *           The data is a pointer to a pre-allocated space
+       *           where the user wrote the value that he wants
+       *           to write in a field or subfield.
+       */
+
+      case EFUSEIOC_WRITE_FIELD:
+        {
+          FAR struct efuse_param_s *param =
+                     (FAR struct efuse_param_s *)((uintptr_t)arg);
+
+          /* Write the efuse */
+
+          DEBUGASSERT(lower->ops->write_field); /* Required */
+          ret = lower->ops->write_field(lower,
+                                        param->field,
+                                        param->data,
+                                        param->size);
+        }
+        break;
+
+      default:
+        {
+          minfo("Forwarding unrecognized cmd: %d arg: %lu\n", cmd, arg);
+
+          /* Ioctls commands that are not recognized by the "upper-half"
+           * driver are forwarded to the lower half driver through this
+           * method.
+           */
+
+          if (lower->ops->ioctl) /* Optional */
+            {
+              ret = lower->ops->ioctl(lower, cmd, arg);
+            }
+          else
+            {
+              ret = -ENOTTY;
+            }
+        }
+        break;
     }
 
   nxmutex_unlock(&upper->lock);
diff --git a/drivers/lcd/lcd_dev.c b/drivers/lcd/lcd_dev.c
index c1d39ca0f61..8d94aab542b 100644
--- a/drivers/lcd/lcd_dev.c
+++ b/drivers/lcd/lcd_dev.c
@@ -171,223 +171,226 @@ static int lcddev_ioctl(FAR struct file *filep, int 
cmd, unsigned long arg)
 
   switch (cmd)
     {
-    case LCDDEVIO_GETRUN:
-      {
-        FAR struct lcddev_run_s *lcd_run =
-            (FAR struct lcddev_run_s *)arg;
-
-        ret = priv->planeinfo.getrun(priv->lcd_ptr, lcd_run->row,
-                                     lcd_run->col, lcd_run->data,
-                                     lcd_run->npixels);
-      }
-      break;
-    case LCDDEVIO_PUTRUN:
-      {
-        FAR const struct lcddev_run_s *lcd_run =
-            (FAR const struct lcddev_run_s *)arg;
-
-        ret = priv->planeinfo.putrun(priv->lcd_ptr,
-                                     lcd_run->row, lcd_run->col,
-                                     lcd_run->data, lcd_run->npixels);
-      }
-      break;
-    case LCDDEVIO_GETAREA:
-      {
-        FAR struct lcddev_area_s *lcd_area =
-            (FAR struct lcddev_area_s *)arg;
-        size_t cols = lcd_area->col_end - lcd_area->col_start + 1;
-        size_t pixel_size = priv->planeinfo.bpp > 1 ?
-                            priv->planeinfo.bpp >> 3 : 1;
-        size_t row_size = lcd_area->stride > 0 ?
-                          lcd_area->stride : cols * pixel_size;
-
-        if (priv->planeinfo.getarea)
-          {
-            ret = priv->planeinfo.getarea(priv->lcd_ptr,
-                                          lcd_area->row_start,
-                                          lcd_area->row_end,
-                                          lcd_area->col_start,
-                                          lcd_area->col_end,
-                                          lcd_area->data,
-                                          row_size);
-          }
-        else
-          {
-            /* Emulate getarea() using getrun() */
-
-            uint8_t *buf = lcd_area->data;
-            int row;
-
-            for (row = lcd_area->row_start; row <= lcd_area->row_end; row++)
-              {
-                ret = priv->planeinfo.getrun(priv->lcd_ptr, row,
-                                             lcd_area->col_start, buf,
-                                             cols);
-                if (ret < 0)
-                  {
-                    break;
-                  }
-
-                buf += row_size;
-              }
-          }
-      }
-      break;
-    case LCDDEVIO_PUTAREA:
-      {
-        FAR const struct lcddev_area_s *lcd_area =
-            (FAR const struct lcddev_area_s *)arg;
-        size_t cols = lcd_area->col_end - lcd_area->col_start + 1;
-        size_t pixel_size = priv->planeinfo.bpp > 1 ?
-                            priv->planeinfo.bpp >> 3 : 1;
-        size_t row_size = lcd_area->stride > 0 ?
-                          lcd_area->stride : cols * pixel_size;
-
-        if (priv->planeinfo.putarea)
-          {
-            ret = priv->planeinfo.putarea(priv->lcd_ptr,
-                                          lcd_area->row_start,
-                                          lcd_area->row_end,
-                                          lcd_area->col_start,
-                                          lcd_area->col_end,
-                                          lcd_area->data,
-                                          row_size);
-          }
-        else
-          {
-            /* Emulate putarea() using putrun() */
-
-            uint8_t *buf = lcd_area->data;
-            int row;
-
-            for (row = lcd_area->row_start; row <= lcd_area->row_end; row++)
-              {
-                ret = priv->planeinfo.putrun(priv->lcd_ptr, row,
-                                             lcd_area->col_start, buf,
-                                             cols);
-                if (ret < 0)
-                  {
-                    break;
-                  }
-
-                buf += row_size;
-              }
-          }
-      }
-      break;
-    case LCDDEVIO_GETPOWER:
-      {
-        *((FAR int *)arg) = priv->lcd_ptr->getpower(priv->lcd_ptr);
-      }
-      break;
-    case LCDDEVIO_SETPOWER:
-      {
-        ret = priv->lcd_ptr->setpower(priv->lcd_ptr, (int)arg);
-      }
-      break;
-    case LCDDEVIO_GETCONTRAST:
-      {
-        *((FAR int *)arg) = priv->lcd_ptr->getcontrast(priv->lcd_ptr);
-      }
-      break;
-    case LCDDEVIO_SETCONTRAST:
-      {
-        ret = priv->lcd_ptr->setcontrast(priv->lcd_ptr, (unsigned int)arg);
-      }
-      break;
-    case LCDDEVIO_GETPLANEINFO:
-      {
-        *((FAR struct lcd_planeinfo_s *)arg) = priv->planeinfo;
-      }
-      break;
-    case LCDDEVIO_GETVIDEOINFO:
-      {
-        ret = priv->lcd_ptr->getvideoinfo(priv->lcd_ptr,
-                                          (FAR struct fb_videoinfo_s *)arg);
-      }
-      break;
-    case LCDDEVIO_SETPLANENO:
-      {
-        ret = priv->lcd_ptr->getplaneinfo(priv->lcd_ptr, (int)arg,
-                                          &priv->planeinfo);
-      }
-      break;
+      case LCDDEVIO_GETRUN:
+        {
+          FAR struct lcddev_run_s *lcd_run =
+              (FAR struct lcddev_run_s *)arg;
+
+          ret = priv->planeinfo.getrun(priv->lcd_ptr, lcd_run->row,
+                                       lcd_run->col, lcd_run->data,
+                                       lcd_run->npixels);
+        }
+        break;
+      case LCDDEVIO_PUTRUN:
+        {
+          FAR const struct lcddev_run_s *lcd_run =
+              (FAR const struct lcddev_run_s *)arg;
+
+          ret = priv->planeinfo.putrun(priv->lcd_ptr,
+                                       lcd_run->row, lcd_run->col,
+                                       lcd_run->data, lcd_run->npixels);
+        }
+        break;
+      case LCDDEVIO_GETAREA:
+        {
+          FAR struct lcddev_area_s *lcd_area =
+              (FAR struct lcddev_area_s *)arg;
+          size_t cols = lcd_area->col_end - lcd_area->col_start + 1;
+          size_t pixel_size = priv->planeinfo.bpp > 1 ?
+                              priv->planeinfo.bpp >> 3 : 1;
+          size_t row_size = lcd_area->stride > 0 ?
+                            lcd_area->stride : cols * pixel_size;
+
+          if (priv->planeinfo.getarea)
+            {
+              ret = priv->planeinfo.getarea(priv->lcd_ptr,
+                                            lcd_area->row_start,
+                                            lcd_area->row_end,
+                                            lcd_area->col_start,
+                                            lcd_area->col_end,
+                                            lcd_area->data,
+                                            row_size);
+            }
+          else
+            {
+              /* Emulate getarea() using getrun() */
+
+              uint8_t *buf = lcd_area->data;
+              int row;
+
+              for (row = lcd_area->row_start; row <= lcd_area->row_end;
+                   row++)
+                {
+                  ret = priv->planeinfo.getrun(priv->lcd_ptr, row,
+                                               lcd_area->col_start, buf,
+                                               cols);
+                  if (ret < 0)
+                    {
+                      break;
+                    }
+
+                  buf += row_size;
+                }
+            }
+        }
+        break;
+      case LCDDEVIO_PUTAREA:
+        {
+          FAR const struct lcddev_area_s *lcd_area =
+              (FAR const struct lcddev_area_s *)arg;
+          size_t cols = lcd_area->col_end - lcd_area->col_start + 1;
+          size_t pixel_size = priv->planeinfo.bpp > 1 ?
+                              priv->planeinfo.bpp >> 3 : 1;
+          size_t row_size = lcd_area->stride > 0 ?
+                            lcd_area->stride : cols * pixel_size;
+
+          if (priv->planeinfo.putarea)
+            {
+              ret = priv->planeinfo.putarea(priv->lcd_ptr,
+                                            lcd_area->row_start,
+                                            lcd_area->row_end,
+                                            lcd_area->col_start,
+                                            lcd_area->col_end,
+                                            lcd_area->data,
+                                            row_size);
+            }
+          else
+            {
+              /* Emulate putarea() using putrun() */
+
+              uint8_t *buf = lcd_area->data;
+              int row;
+
+              for (row = lcd_area->row_start; row <= lcd_area->row_end;
+                   row++)
+                {
+                  ret = priv->planeinfo.putrun(priv->lcd_ptr, row,
+                                               lcd_area->col_start, buf,
+                                               cols);
+                  if (ret < 0)
+                    {
+                      break;
+                    }
+
+                  buf += row_size;
+                }
+            }
+        }
+        break;
+      case LCDDEVIO_GETPOWER:
+        {
+          *((FAR int *)arg) = priv->lcd_ptr->getpower(priv->lcd_ptr);
+        }
+        break;
+      case LCDDEVIO_SETPOWER:
+        {
+          ret = priv->lcd_ptr->setpower(priv->lcd_ptr, (int)arg);
+        }
+        break;
+      case LCDDEVIO_GETCONTRAST:
+        {
+          *((FAR int *)arg) = priv->lcd_ptr->getcontrast(priv->lcd_ptr);
+        }
+        break;
+      case LCDDEVIO_SETCONTRAST:
+        {
+          ret = priv->lcd_ptr->setcontrast(priv->lcd_ptr, (unsigned int)arg);
+        }
+        break;
+      case LCDDEVIO_GETPLANEINFO:
+        {
+          *((FAR struct lcd_planeinfo_s *)arg) = priv->planeinfo;
+        }
+        break;
+      case LCDDEVIO_GETVIDEOINFO:
+        {
+          ret = priv->lcd_ptr->getvideoinfo(
+                  priv->lcd_ptr, (FAR struct fb_videoinfo_s *)arg);
+        }
+        break;
+      case LCDDEVIO_SETPLANENO:
+        {
+          ret = priv->lcd_ptr->getplaneinfo(priv->lcd_ptr, (int)arg,
+                                            &priv->planeinfo);
+        }
+        break;
 #ifdef CONFIG_FB_CMAP
-    case LCDDEVIO_GETCMAP:
-      {
-        FAR struct fb_cmap_s *cmap = (FAR struct fb_cmap_s *)arg;
-
-        ret = priv->lcd_ptr->getcmap(priv->lcd_ptr, cmap);
-      }
-      break;
-    case LCDDEVIO_PUTCMAP:
-      {
-        FAR const struct fb_cmap_s *cmap = (FAR const struct fb_cmap_s *)arg;
-
-        ret = priv->lcd_ptr->putcmap(priv->lcd_ptr, cmap);
-      }
-      break;
+      case LCDDEVIO_GETCMAP:
+        {
+          FAR struct fb_cmap_s *cmap = (FAR struct fb_cmap_s *)arg;
+
+          ret = priv->lcd_ptr->getcmap(priv->lcd_ptr, cmap);
+        }
+        break;
+      case LCDDEVIO_PUTCMAP:
+        {
+          FAR const struct fb_cmap_s *cmap =
+            (FAR const struct fb_cmap_s *)arg;
+
+          ret = priv->lcd_ptr->putcmap(priv->lcd_ptr, cmap);
+        }
+        break;
 #endif
 #ifdef CONFIG_FB_HWCURSOR
-    case LCDDEVIO_GETCURSOR:
-      {
-        FAR struct fb_cursorattrib_s *attrib =
-            (FAR struct fb_cursorattrib_s *)arg;
-
-        ret = priv->lcd_ptr->getcursor(priv->lcd_ptr, attrib);
-      }
-      break;
-    case LCDDEVIO_SETCURSOR:
-      {
-        FAR struct fb_setcursor_s *settings =
-            (FAR struct fb_setcursor_s *)arg;
-
-        ret = priv->lcd_ptr->setcursor(priv->lcd_ptr, settings);
-      }
-      break;
+      case LCDDEVIO_GETCURSOR:
+        {
+          FAR struct fb_cursorattrib_s *attrib =
+              (FAR struct fb_cursorattrib_s *)arg;
+
+          ret = priv->lcd_ptr->getcursor(priv->lcd_ptr, attrib);
+        }
+        break;
+      case LCDDEVIO_SETCURSOR:
+        {
+          FAR struct fb_setcursor_s *settings =
+              (FAR struct fb_setcursor_s *)arg;
+
+          ret = priv->lcd_ptr->setcursor(priv->lcd_ptr, settings);
+        }
+        break;
 #endif
-    case LCDDEVIO_SETFRAMERATE:
-      {
-        ret = priv->lcd_ptr->setframerate(priv->lcd_ptr, (int)arg);
-      }
-      break;
-    case LCDDEVIO_GETFRAMERATE:
-      {
-        *((FAR int *)arg) = priv->lcd_ptr->getframerate(priv->lcd_ptr);
-      }
-      break;
-    case LCDDEVIO_GETAREAALIGN:
-      {
-        FAR struct lcddev_area_align_s *area_align =
-            (FAR struct lcddev_area_align_s *)arg;
-
-        if (priv->lcd_ptr->getareaalign == NULL)
-          {
-            area_align->row_start_align = 1;
-            area_align->height_align    = 1;
-            area_align->col_start_align = 1;
-            area_align->width_align     = 1;
-            area_align->buf_align       = sizeof(uintptr_t);
-          }
-        else
-          {
-            ret = priv->lcd_ptr->getareaalign(priv->lcd_ptr, area_align);
-          }
-      }
-      break;
-    default:
-      {
-        if (priv->lcd_ptr->ioctl)
-          {
-            ret = priv->lcd_ptr->ioctl(priv->lcd_ptr, cmd, arg);
-          }
-        else
-          {
-            gerr("ERROR: Unsupported IOCTL command: %d\n", cmd);
-            ret = -ENOTTY;
-          }
-      }
-      break;
+      case LCDDEVIO_SETFRAMERATE:
+        {
+          ret = priv->lcd_ptr->setframerate(priv->lcd_ptr, (int)arg);
+        }
+        break;
+      case LCDDEVIO_GETFRAMERATE:
+        {
+          *((FAR int *)arg) = priv->lcd_ptr->getframerate(priv->lcd_ptr);
+        }
+        break;
+      case LCDDEVIO_GETAREAALIGN:
+        {
+          FAR struct lcddev_area_align_s *area_align =
+              (FAR struct lcddev_area_align_s *)arg;
+
+          if (priv->lcd_ptr->getareaalign == NULL)
+            {
+              area_align->row_start_align = 1;
+              area_align->height_align    = 1;
+              area_align->col_start_align = 1;
+              area_align->width_align     = 1;
+              area_align->buf_align       = sizeof(uintptr_t);
+            }
+          else
+            {
+              ret = priv->lcd_ptr->getareaalign(priv->lcd_ptr, area_align);
+            }
+        }
+        break;
+      default:
+        {
+          if (priv->lcd_ptr->ioctl)
+            {
+              ret = priv->lcd_ptr->ioctl(priv->lcd_ptr, cmd, arg);
+            }
+          else
+            {
+              gerr("ERROR: Unsupported IOCTL command: %d\n", cmd);
+              ret = -ENOTTY;
+            }
+        }
+        break;
     }
 
   return ret;
diff --git a/drivers/usbdev/rndis.c b/drivers/usbdev/rndis.c
index 4045627bc8d..ce7f019e2a1 100644
--- a/drivers/usbdev/rndis.c
+++ b/drivers/usbdev/rndis.c
@@ -1726,20 +1726,20 @@ static void rndis_rdcomplete(FAR struct usbdev_ep_s *ep,
 
   switch (req->result)
     {
-    case 0: /* Normal completion */
-      ret = rndis_recvpacket(priv, req->buf, req->xfrd);
-      DEBUGASSERT(ret != -ENOMEM);
-      break;
+      case 0: /* Normal completion */
+        ret = rndis_recvpacket(priv, req->buf, req->xfrd);
+        DEBUGASSERT(ret != -ENOMEM);
+        break;
 
-    case -ESHUTDOWN: /* Disconnection */
-      usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_RDSHUTDOWN), 0);
-      leave_critical_section(flags);
-      return;
+      case -ESHUTDOWN: /* Disconnection */
+        usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_RDSHUTDOWN), 0);
+        leave_critical_section(flags);
+        return;
 
-    default: /* Some other error occurred */
-      usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_RDUNEXPECTED),
-               (uint16_t)-req->result);
-      break;
+      default: /* Some other error occurred */
+        usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_RDUNEXPECTED),
+                 (uint16_t)-req->result);
+        break;
     };
 
   if (ret == OK)
@@ -1792,17 +1792,17 @@ static void rndis_wrcomplete(FAR struct usbdev_ep_s *ep,
 
   switch (req->result)
     {
-    case OK: /* Normal completion */
-      priv->rndis_host_rx_count++;
-      break;
+      case OK: /* Normal completion */
+        priv->rndis_host_rx_count++;
+        break;
 
-    case -ESHUTDOWN: /* Disconnection */
-      break;
+      case -ESHUTDOWN: /* Disconnection */
+        break;
 
-    default: /* Some other error occurred */
-      usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_WRUNEXPECTED),
-               (uint16_t)-req->result);
-      break;
+      default: /* Some other error occurred */
+        usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_WRUNEXPECTED),
+                 (uint16_t)-req->result);
+        break;
     }
 
   leave_critical_section(flags);
@@ -2489,158 +2489,164 @@ static int usbclass_setup(FAR struct 
usbdevclass_driver_s *driver,
 
   switch (ctrl->type & USB_REQ_TYPE_MASK)
     {
-     /***********************************************************************
-      * Standard Requests
-      ***********************************************************************/
+      /**********************************************************************
+       * Standard Requests
+       **********************************************************************/
 
-    case USB_REQ_TYPE_STANDARD:
-      {
-        switch (ctrl->req)
-          {
-          case USB_REQ_GETDESCRIPTOR:
+      case USB_REQ_TYPE_STANDARD:
+        {
+          switch (ctrl->req)
             {
-              /* The value field specifies the descriptor type in the MS byte
-               * and the descriptor index in the LS byte (order is little
-               * endian)
-               */
-
-              switch (ctrl->value[1])
+              case USB_REQ_GETDESCRIPTOR:
                 {
+                  /* The value field specifies the descriptor type in the MS
+                   * byte and the descriptor index in the LS byte (order is
+                   * little endian)
+                   */
+
+                  switch (ctrl->value[1])
+                    {
 #ifndef CONFIG_RNDIS_COMPOSITE
-                case USB_DESC_TYPE_DEVICE:
-                  {
-                    ret = usbdev_copy_devdesc(ctrlreq->buf,
-                                              &g_devdesc,
-                                              dev->speed);
-                  }
-                  break;
+                      case USB_DESC_TYPE_DEVICE:
+                        {
+                          ret = usbdev_copy_devdesc(ctrlreq->buf,
+                                                    &g_devdesc,
+                                                    dev->speed);
+                        }
+                        break;
 #endif
 
-                /* If the serial device is used in as part of a composite
-                 * device, then the configuration descriptor is provided by
-                 * logic in the composite device implementation.
-                 */
+                      /* If the serial device is used in as part of a
+                       * composite device, then the configuration descriptor
+                       * is provided by logic in the composite device
+                       * implementation.
+                       */
 
 #ifndef CONFIG_RNDIS_COMPOSITE
 #  ifdef CONFIG_USBDEV_DUALSPEED
-                case USB_DESC_TYPE_OTHERSPEEDCONFIG:
+                      case USB_DESC_TYPE_OTHERSPEEDCONFIG:
 #  endif /* CONFIG_USBDEV_DUALSPEED */
-                case USB_DESC_TYPE_CONFIG:
-                  {
-                    ret = usbclass_mkcfgdesc(ctrlreq->buf, &priv->devinfo,
-                                             dev->speed, ctrl->value[1]);
-                  }
-                  break;
+                      case USB_DESC_TYPE_CONFIG:
+                        {
+                          ret = usbclass_mkcfgdesc(ctrlreq->buf,
+                                                   &priv->devinfo,
+                                                   dev->speed,
+                                                   ctrl->value[1]);
+                        }
+                        break;
 #endif
 
 #ifndef CONFIG_RNDIS_COMPOSITE
-                case USB_DESC_TYPE_STRING:
-                  {
-                    /* index == language code. */
+                      case USB_DESC_TYPE_STRING:
+                        {
+                          /* index == language code. */
 
-                    ret = usbclass_mkstrdesc(ctrl->value[0],
+                          ret = usbclass_mkstrdesc(ctrl->value[0],
                                   (FAR struct usb_strdesc_s *)ctrlreq->buf);
-                  }
-                  break;
+                        }
+                        break;
 #endif
 
-                default:
-                  {
-                    usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_GETUNKNOWNDESC),
-                             value);
-                  }
-                  break;
+                      default:
+                        {
+                          usbtrace(TRACE_CLSERROR(
+                                     USBSER_TRACEERR_GETUNKNOWNDESC),
+                                   value);
+                        }
+                        break;
+                    }
                 }
-            }
-            break;
+                break;
 
-          case USB_REQ_SETCONFIGURATION:
-            {
-              if (ctrl->type == 0)
+              case USB_REQ_SETCONFIGURATION:
                 {
-                  ret = usbclass_setconfig(priv, value);
+                  if (ctrl->type == 0)
+                    {
+                      ret = usbclass_setconfig(priv, value);
+                    }
                 }
-            }
-            break;
+                break;
 
-          /* If the serial device is used in as part of a composite device,
-           * then the overall composite class configuration is managed by
-           * logic in the composite device implementation.
-           */
+              /* If the serial device is used in as part of a composite
+               * device, then the overall composite class configuration is
+               * managed by logic in the composite device implementation.
+               */
 
 #ifndef CONFIG_RNDIS_COMPOSITE
-          case USB_REQ_GETCONFIGURATION:
-            {
-              if (ctrl->type == USB_DIR_IN)
+              case USB_REQ_GETCONFIGURATION:
                 {
-                  *(FAR uint8_t *)ctrlreq->buf = priv->config;
-                  ret = 1;
+                  if (ctrl->type == USB_DIR_IN)
+                    {
+                      *(FAR uint8_t *)ctrlreq->buf = priv->config;
+                      ret = 1;
+                    }
                 }
-            }
-            break;
+                break;
 #endif
 
-          default:
-            usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
-                     ctrl->req);
-            break;
-          }
-      }
-      break;
+              default:
+                usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
+                         ctrl->req);
+                break;
+            }
+        }
+        break;
 
-    /* Class requests */
+      /* Class requests */
 
-    case USB_REQ_TYPE_CLASS:
-      {
-        if ((ctrl->type & USB_REQ_RECIPIENT_MASK) ==
-            USB_REQ_RECIPIENT_INTERFACE)
-          {
-            if (ctrl->req == RNDIS_SEND_ENCAPSULATED_COMMAND)
-              {
-                ret = rndis_handle_control_message(priv, dataout, outlen);
-              }
-            else if (ctrl->req == RNDIS_GET_ENCAPSULATED_RESPONSE)
-              {
-                if (priv->response_queue_words == 0)
-                  {
-                    /* No reply available is indicated with a single
-                     * 0x00 byte.
-                     */
-
-                    ret = 1;
-                    ctrlreq->buf[0] = 0;
-                  }
-                else
-                  {
-                    /* Reply info as many as possible, if host read less than
-                     * cached, just send one msg to avoid msg truncation
-                     */
-
-                    FAR struct rndis_response_header *hdr =
-                      (struct rndis_response_header *)priv->response_queue;
-                    ret = priv->response_queue_words * sizeof(uint32_t);
-                    if (ret > len)
-                      {
-                        if (hdr->msglen > len)
-                          {
-                            ret = -EMSGSIZE;
-                            break;
-                          }
-
-                        ret = hdr->msglen;
-                      }
-
-                    memcpy(ctrlreq->buf, hdr, ret);
-                    ctrlreq->priv = priv;
-                  }
-              }
-          }
-      }
-      break;
+      case USB_REQ_TYPE_CLASS:
+        {
+          if ((ctrl->type & USB_REQ_RECIPIENT_MASK) ==
+              USB_REQ_RECIPIENT_INTERFACE)
+            {
+              if (ctrl->req == RNDIS_SEND_ENCAPSULATED_COMMAND)
+                {
+                  ret = rndis_handle_control_message(priv, dataout, outlen);
+                }
+              else if (ctrl->req == RNDIS_GET_ENCAPSULATED_RESPONSE)
+                {
+                  if (priv->response_queue_words == 0)
+                    {
+                      /* No reply available is indicated with a single
+                       * 0x00 byte.
+                       */
+
+                      ret = 1;
+                      ctrlreq->buf[0] = 0;
+                    }
+                  else
+                    {
+                      /* Reply info as many as possible, if host read less
+                       * than cached, just send one msg to avoid msg
+                       * truncation
+                       */
+
+                      FAR struct rndis_response_header *hdr =
+                        (struct rndis_response_header *)priv->response_queue;
+                      ret = priv->response_queue_words * sizeof(uint32_t);
+                      if (ret > len)
+                        {
+                          if (hdr->msglen > len)
+                            {
+                              ret = -EMSGSIZE;
+                              break;
+                            }
+
+                          ret = hdr->msglen;
+                        }
 
-    default:
-      usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDTYPE), ctrl->type);
-      break;
+                      memcpy(ctrlreq->buf, hdr, ret);
+                      ctrlreq->priv = priv;
+                    }
+                }
+            }
+        }
+        break;
+
+      default:
+        usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_UNSUPPORTEDTYPE),
+                 ctrl->type);
+        break;
     }
 
   /* Respond to the setup command if data was returned.  On an error return
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
index 29bf96a1f9e..1091da6f317 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c
@@ -253,7 +253,7 @@ static void bcmf_receive(FAR struct bcmf_dev_s *priv)
 #ifdef CONFIG_NET_PKT
       /* When packet sockets are enabled, feed the frame into the tap */
 
-       pkt_input(&priv->bc_dev);
+      pkt_input(&priv->bc_dev);
 #endif
 
       /* Check if this is an 802.1Q VLAN tagged packet */
@@ -269,6 +269,7 @@ static void bcmf_receive(FAR struct bcmf_dev_s *priv)
           /* ### TODO ### Implement VLAN support */
 
           uint8_t temp_buffer[12];
+
           memcpy(temp_buffer, frame->data, 12);
           memcpy(frame->data + 4, temp_buffer, 12);
 
diff --git a/net/nat/nat.c b/net/nat/nat.c
index ff2ea994954..3845d5f4676 100644
--- a/net/nat/nat.c
+++ b/net/nat/nat.c
@@ -316,6 +316,7 @@ int nat_port_select(FAR struct net_driver_s *dev,
 #ifdef CONFIG_NET_ICMP_SOCKET
           uint16_t id = local_port;
           uint16_t hid = NTOHS(id);
+
           while (icmp_findconn(dev, id) ||
                  nat_port_inuse(domain, IP_PROTO_ICMP, external_ip, id))
             {
@@ -344,6 +345,7 @@ int nat_port_select(FAR struct net_driver_s *dev,
 #ifdef CONFIG_NET_ICMPv6_SOCKET
           uint16_t id = local_port;
           uint16_t hid = NTOHS(id);
+
           while (icmpv6_active(id) ||
                  nat_port_inuse(domain, IP_PROTO_ICMP6, external_ip, id))
             {
@@ -429,7 +431,7 @@ uint32_t nat_expire_time(uint8_t protocol)
       default:
         nwarn("WARNING: Unsupported protocol %" PRIu8 "\n", protocol);
         return 0;
-  }
+    }
 }
 
 /****************************************************************************
diff --git a/net/utils/net_bufpool.c b/net/utils/net_bufpool.c
index 9a8c0848af3..80603bce43c 100644
--- a/net/utils/net_bufpool.c
+++ b/net/utils/net_bufpool.c
@@ -69,6 +69,7 @@ static void net_bufpool_init(FAR struct net_bufpool_s *pool)
     {
       FAR struct net_bufnode_s *node = (FAR struct net_bufnode_s *)
                                       (pool->pool + i * pool->nodesize);
+
       sq_addlast(&node->node, &pool->freebuffers);
     }
 }

Reply via email to