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

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

commit 1301cb4b0fc6b582b0745fea724400ff75f58c61
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 19 00:19:20 2026 +0200

    arch, boards: Fix the nxstyle errors in 10 poll driver files.
    
    Fix the older nxstyle errors in these files: indentation, alignment of
    braces and comments, and the blank line after declarations. This is a
    layout change only. The C tokens do not change. tools/nxstyle.c reports
    no error for them now.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 arch/arm/src/common/stm32/stm32_bbsram_m3m4_v1.c   |  26 ++--
 arch/arm/src/rtl8720c/ameba_hci.c                  |  13 ++
 arch/arm/src/sama5/sam_tsd.c                       |  10 +-
 arch/arm/src/stm32f7/stm32_bbsram.c                |  26 ++--
 arch/arm/src/stm32h7/stm32_bbsram.c                |  26 ++--
 arch/renesas/src/rx65n/rx65n_sbram.c               |  26 ++--
 boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c  |   6 +-
 boards/arm/sam34/sam4l-xplained/src/sam_slcd.c     |  23 ++--
 boards/arm/stm32l1/stm32ldiscovery/src/stm32_lcd.c | 145 +++++++++++----------
 .../pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c     |  28 ++--
 10 files changed, 176 insertions(+), 153 deletions(-)

diff --git a/arch/arm/src/common/stm32/stm32_bbsram_m3m4_v1.c 
b/arch/arm/src/common/stm32/stm32_bbsram_m3m4_v1.c
index 1d05478796d..477997b7db7 100644
--- a/arch/arm/src/common/stm32/stm32_bbsram_m3m4_v1.c
+++ b/arch/arm/src/common/stm32/stm32_bbsram_m3m4_v1.c
@@ -374,24 +374,24 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t 
offset,
 
   switch (whence)
     {
-    case SEEK_CUR:
-      newpos = filep->f_pos + offset;
-      break;
+      case SEEK_CUR:
+        newpos = filep->f_pos + offset;
+        break;
 
-    case SEEK_SET:
-      newpos = offset;
-      break;
+      case SEEK_SET:
+        newpos = offset;
+        break;
 
-    case SEEK_END:
-      newpos = bbr->bbf->len + offset;
-      break;
+      case SEEK_END:
+        newpos = bbr->bbf->len + offset;
+        break;
 
-    default:
+      default:
 
-      /* Return EINVAL if the whence argument is invalid */
+        /* Return EINVAL if the whence argument is invalid */
 
-      nxmutex_unlock(&bbr->lock);
-      return -EINVAL;
+        nxmutex_unlock(&bbr->lock);
+        return -EINVAL;
     }
 
   /* Opengroup.org:
diff --git a/arch/arm/src/rtl8720c/ameba_hci.c 
b/arch/arm/src/rtl8720c/ameba_hci.c
index 90717496fce..0ac6376ae8a 100644
--- a/arch/arm/src/rtl8720c/ameba_hci.c
+++ b/arch/arm/src/rtl8720c/ameba_hci.c
@@ -64,6 +64,7 @@ static int hci_recv(struct file *filep, uint8_t *buf, size_t 
count)
 {
   ssize_t ret;
   ssize_t nread = 0;
+
   while (count != nread)
     {
       ret = file_read(filep, buf + nread, count - nread);
@@ -89,6 +90,7 @@ static int hci_send(struct file *filep, uint8_t *buf, size_t 
count)
 {
   ssize_t ret;
   ssize_t nwritten = 0;
+
   while (nwritten != count)
     {
       ret = file_write(filep, buf + nwritten, count - nwritten);
@@ -181,6 +183,7 @@ static int hci_check_local_ver(struct file *filep)
   /* OpCode: 0x1001, h4 buf_len: Cmd(1+3=4), Event(1+14=15) */
 
   unsigned char command[15];
+
   command[0] = H4_CMD;
   command[1] = 0x01;
   command[2] = 0x10;
@@ -210,6 +213,7 @@ static int hci_check_local_ver(struct file *filep)
 
   uint16_t lmp_sbuver =
     ((uint16_t)command[13]) | (((uint16_t)command[14]) << 8);
+
   if (BT_DEFAUT_LMP_SUBVER != lmp_sbuver)
     {
       return -EALREADY;
@@ -223,6 +227,7 @@ static int hci_check_local_rom_ver(struct file *filep)
   /* OpCode: 0xfc6d, h4 buf_len: Cmd(1+3=4), Event(1+7=8) */
 
   unsigned char command[8];
+
   command[0] = H4_CMD;
   command[1] = 0x6d;
   command[2] = 0xfc;
@@ -266,6 +271,7 @@ static int hci_update_baudrate(struct file *filep)
   struct termios toptions;
   uint32_t bt_baudrate;
   uint32_t uart_baudrate;
+
   command[0] = H4_CMD;
   command[1] = 0x17;
   command[2] = 0xfc;
@@ -312,6 +318,7 @@ static int hci_load_firmware(struct file *filep)
   uint8_t *addr;
   int i;
   int ret;
+
   drv = netdev_findbyname(AMEBAZ_WIRELESS_NAME);
   if (drv == NULL)
     {
@@ -362,6 +369,7 @@ static int hci_update_efuse_iqk(struct file *filep)
   /* OpCode: 0xfd91, h4 buf_len: Cmd(1+15=16), Event(1+6=7) */
 
   unsigned char command[16];
+
   command[0] = H4_CMD;
   command[1] = 0x91;
   command[2] = 0xfd;
@@ -391,6 +399,7 @@ static int hci_open(struct file *filep)
   struct inode *inode = filep->f_inode;
   hci_dev_t *dev = inode->i_private;
   int ret;
+
   ret = file_open(&dev->filep,
                   CONFIG_AMEBA_HCI_DEV_NAME, O_RDWR | O_CLOEXEC);
   if (ret < 0)
@@ -466,6 +475,7 @@ static ssize_t hci_read(struct file *filep,
 {
   struct inode *inode = filep->f_inode;
   hci_dev_t *dev = inode->i_private;
+
   return file_read(&dev->filep, buffer, buflen);
 }
 
@@ -474,6 +484,7 @@ static ssize_t hci_write(struct file *filep, const char 
*buffer,
 {
   struct inode *inode = filep->f_inode;
   hci_dev_t *dev = inode->i_private;
+
   return file_write(&dev->filep, buffer, buflen);
 }
 
@@ -481,6 +492,7 @@ static int hci_ioctl(struct file *filep, int cmd, unsigned 
long arg)
 {
   struct inode *inode = filep->f_inode;
   hci_dev_t *dev = inode->i_private;
+
   return file_ioctl(&dev->filep, cmd, arg);
 }
 
@@ -489,6 +501,7 @@ static int hci_poll(struct file *filep,
 {
   struct inode *inode = filep->f_inode;
   hci_dev_t *dev = inode->i_private;
+
   return file_poll(&dev->filep, fds, setup);
 }
 
diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c
index b2c3e48e392..67f0cf1e62b 100644
--- a/arch/arm/src/sama5/sam_tsd.c
+++ b/arch/arm/src/sama5/sam_tsd.c
@@ -480,8 +480,8 @@ static void sam_tsd_setaverage(struct sam_tsd_s *priv, 
uint32_t tsav)
           tsfreq = minfreq;
         }
 
-        regval &= ~ADC_TSMR_TSFREQ_MASK;
-        regval |=  ADC_TSMR_TSFREQ(minfreq);
+      regval &= ~ADC_TSMR_TSFREQ_MASK;
+      regval |=  ADC_TSMR_TSFREQ(minfreq);
     }
 
   /* Save the new filter value */
@@ -587,7 +587,7 @@ static void sam_tsd_bottomhalf(void *arg)
        * after the loss of contact is sampled.
        */
 
-       priv->sample.contact = CONTACT_UP;
+      priv->sample.contact = CONTACT_UP;
 
       /* Stop periodic trigger & enable pen */
 
@@ -1148,13 +1148,14 @@ static int sam_tsd_ioctl(struct file *filep, int cmd, 
unsigned long arg)
           regval = ADC_CR_TSCALIB | ADC_CR_START;
           sam_adc_putreg(priv->adc, SAM_ADC_CR, regval);
         }
-      break;
+        break;
       case TSIOC_CALDATA:
         {
           /* Receive calibration data for the touchscreen */
 
           struct g_tscaldata_s *ptr =
                                (struct g_tscaldata_s *)((uintptr_t)arg);
+
           DEBUGASSERT(ptr != NULL);
           priv->caldata = *ptr;
         }
@@ -1244,6 +1245,7 @@ static int sam_tsd_poll(struct file *filep, struct pollfd 
*fds, bool setup)
       /* This is a request to tear down the poll. */
 
       struct pollfd **slot = (struct pollfd **)fds->priv;
+
       DEBUGASSERT(slot != NULL);
 
       /* Remove all memory of the poll setup */
diff --git a/arch/arm/src/stm32f7/stm32_bbsram.c 
b/arch/arm/src/stm32f7/stm32_bbsram.c
index 5f3f6693d7c..871a5d5cd13 100644
--- a/arch/arm/src/stm32f7/stm32_bbsram.c
+++ b/arch/arm/src/stm32f7/stm32_bbsram.c
@@ -374,24 +374,24 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t 
offset,
 
   switch (whence)
     {
-    case SEEK_CUR:
-      newpos = filep->f_pos + offset;
-      break;
+      case SEEK_CUR:
+        newpos = filep->f_pos + offset;
+        break;
 
-    case SEEK_SET:
-      newpos = offset;
-      break;
+      case SEEK_SET:
+        newpos = offset;
+        break;
 
-    case SEEK_END:
-      newpos = bbr->bbf->len + offset;
-      break;
+      case SEEK_END:
+        newpos = bbr->bbf->len + offset;
+        break;
 
-    default:
+      default:
 
-      /* Return EINVAL if the whence argument is invalid */
+        /* Return EINVAL if the whence argument is invalid */
 
-      nxmutex_unlock(&bbr->lock);
-      return -EINVAL;
+        nxmutex_unlock(&bbr->lock);
+        return -EINVAL;
     }
 
   /* Opengroup.org:
diff --git a/arch/arm/src/stm32h7/stm32_bbsram.c 
b/arch/arm/src/stm32h7/stm32_bbsram.c
index b4ed0816d10..14f5e5ac59e 100644
--- a/arch/arm/src/stm32h7/stm32_bbsram.c
+++ b/arch/arm/src/stm32h7/stm32_bbsram.c
@@ -420,24 +420,24 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t 
offset,
 
   switch (whence)
     {
-    case SEEK_CUR:
-      newpos = filep->f_pos + offset;
-      break;
+      case SEEK_CUR:
+        newpos = filep->f_pos + offset;
+        break;
 
-    case SEEK_SET:
-      newpos = offset;
-      break;
+      case SEEK_SET:
+        newpos = offset;
+        break;
 
-    case SEEK_END:
-      newpos = bbr->bbf->len + offset;
-      break;
+      case SEEK_END:
+        newpos = bbr->bbf->len + offset;
+        break;
 
-    default:
+      default:
 
-      /* Return EINVAL if the whence argument is invalid */
+        /* Return EINVAL if the whence argument is invalid */
 
-      nxmutex_unlock(&bbr->lock);
-      return -EINVAL;
+        nxmutex_unlock(&bbr->lock);
+        return -EINVAL;
     }
 
   /* Opengroup.org:
diff --git a/arch/renesas/src/rx65n/rx65n_sbram.c 
b/arch/renesas/src/rx65n/rx65n_sbram.c
index 491aec0d81e..29bd1af801b 100644
--- a/arch/renesas/src/rx65n/rx65n_sbram.c
+++ b/arch/renesas/src/rx65n/rx65n_sbram.c
@@ -312,24 +312,24 @@ static off_t rx65n_sbram_seek(struct file *filep, off_t 
offset,
 
   switch (whence)
     {
-    case SEEK_CUR:
-      newpos = filep->f_pos + offset;
-      break;
+      case SEEK_CUR:
+        newpos = filep->f_pos + offset;
+        break;
 
-    case SEEK_SET:
-      newpos = offset;
-      break;
+      case SEEK_SET:
+        newpos = offset;
+        break;
 
-    case SEEK_END:
-      newpos = bbr->bbf->len + offset;
-      break;
+      case SEEK_END:
+        newpos = bbr->bbf->len + offset;
+        break;
 
-    default:
+      default:
 
-      /* Return EINVAL if the whence argument is invalid */
+        /* Return EINVAL if the whence argument is invalid */
 
-      nxmutex_unlock(&bbr->lock);
-      return -EINVAL;
+        nxmutex_unlock(&bbr->lock);
+        return -EINVAL;
     }
 
   /* Opengroup.org:
diff --git a/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c 
b/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c
index 2e11c5b7db3..fdffb9c141b 100644
--- a/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c
+++ b/boards/arm/cxd56xx/drivers/sensors/cxd5610_gnss.c
@@ -1211,6 +1211,7 @@ static int cxd5610_gnss_get_ope_mode(struct 
cxd5610_gnss_dev_s *priv,
   if (ret == OK)
     {
       uint8_t *res = priv->rcvbuf;
+
       ope_mode->mode = 1;
       cxd5610_store32(&ope_mode->cycle, &res[1]);
     }
@@ -1395,7 +1396,8 @@ static int cxd5610_gnss_reset(struct cxd5610_gnss_dev_s 
*priv,
 static int cxd5610_gnss_set_notify(struct cxd5610_gnss_dev_s *priv)
 {
   int ret;
-  uint8_t param[] = {
+  uint8_t param[] =
+  {
     OPC_TIME_NOTIFY,
     OPC_RECEIVER_POS_NOTIFY,
     OPC_RECEIVER_VEL_NOTIFY,
@@ -1834,6 +1836,7 @@ static ssize_t cxd5610_gnss_read_compat(struct 
cxd5610_gnss_dev_s *priv,
   for (i = 0; i < svnum; i++)
     {
       uint8_t type = priv->posdat2->sv[i].type;
+
       posdat->sv[i].type = cxd5610_gnss_signal2type(type);
       posdat->sv[i].svid = priv->posdat2->sv[i].svid;
       posdat->sv[i].stat = priv->posdat2->sv[i].stat;
@@ -2087,6 +2090,7 @@ static void cxd5610_gnss_signalhandler(struct 
cxd5610_gnss_dev_s *priv,
   for (i = 0; i < CONFIG_SENSORS_CXD5610_GNSS_NSIGNALRECEIVERS; i++)
     {
       struct gnss_sig_s *sig = &priv->sigs[i];
+
       if (sig->enable && sig->info.gnsssig == sigtype)
         {
           union sigval value;
diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c 
b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c
index c669a7c43a4..f3710bdcb7f 100644
--- a/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c
+++ b/boards/arm/sam34/sam4l-xplained/src/sam_slcd.c
@@ -644,17 +644,17 @@ static void slcd_action(enum slcdcode_e code, uint8_t 
count)
            * Decrement the cursor position and fall through.
            */
 
-           tmp = (int)g_slcdstate.curpos - count;
-           if (tmp < 0)
-             {
-               tmp   = 0;
-               count = g_slcdstate.curpos;
-             }
+          tmp = (int)g_slcdstate.curpos - count;
+          if (tmp < 0)
+            {
+              tmp   = 0;
+              count = g_slcdstate.curpos;
+            }
 
-           /* Save the updated cursor positions */
+          /* Save the updated cursor positions */
 
-           g_slcdstate.curpos = tmp;
-         }
+          g_slcdstate.curpos = tmp;
+        }
 
       case SLCDCODE_FWDDEL:   /* DELete (forward delete) N characters moving 
text */
         if (count > 0)
@@ -904,7 +904,7 @@ static ssize_t slcd_write(struct file *filep,
 
               /* Ignore dots before control characters (all of them?) */
 
-               options = 0;
+              options = 0;
             }
 
           /* Handle characters decoreated with a preceding period */
@@ -944,7 +944,7 @@ static ssize_t slcd_write(struct file *filep,
                   g_slcdstate.curpos++;
                 }
 
-               slcd_dumpstate("AFTER APPEND");
+              slcd_dumpstate("AFTER APPEND");
             }
         }
       else /* (result == SLCDRET_SPEC) */  /* A special SLCD action was 
returned */
@@ -1075,6 +1075,7 @@ static int slcd_ioctl(struct file *filep, int cmd, 
unsigned long arg)
       case SLCDIOC_GETCONTRAST:
         {
           int *contrast = (int *)((uintptr_t)arg);
+
           if (!contrast)
             {
               return -EINVAL;
diff --git a/boards/arm/stm32l1/stm32ldiscovery/src/stm32_lcd.c 
b/boards/arm/stm32l1/stm32ldiscovery/src/stm32_lcd.c
index 925d157661b..d1765e052d0 100644
--- a/boards/arm/stm32l1/stm32ldiscovery/src/stm32_lcd.c
+++ b/boards/arm/stm32l1/stm32ldiscovery/src/stm32_lcd.c
@@ -713,93 +713,93 @@ static inline void slcd_writemem(uint16_t segset, int 
curpos)
 
   switch (curpos)
     {
-    case 0:
-      ram0 &= SLCD_CHAR1_MASK0;
-      ram0 |= SLCD_CHAR1_UPDATE0(segments[0]);
+      case 0:
+        ram0 &= SLCD_CHAR1_MASK0;
+        ram0 |= SLCD_CHAR1_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR1_MASK1;
-      ram1 |= SLCD_CHAR1_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR1_MASK1;
+        ram1 |= SLCD_CHAR1_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR1_MASK2;
-      ram2 |= SLCD_CHAR1_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR1_MASK2;
+        ram2 |= SLCD_CHAR1_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR1_MASK3;
-      ram3 |= SLCD_CHAR1_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR1_MASK3;
+        ram3 |= SLCD_CHAR1_UPDATE3(segments[3]);
+        break;
 
-    case 1:
-      ram0 &= SLCD_CHAR2_MASK0;
-      ram0 |= SLCD_CHAR2_UPDATE0(segments[0]);
+      case 1:
+        ram0 &= SLCD_CHAR2_MASK0;
+        ram0 |= SLCD_CHAR2_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR2_MASK1;
-      ram1 |= SLCD_CHAR2_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR2_MASK1;
+        ram1 |= SLCD_CHAR2_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR2_MASK2;
-      ram2 |= SLCD_CHAR2_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR2_MASK2;
+        ram2 |= SLCD_CHAR2_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR2_MASK3;
-      ram3 |= SLCD_CHAR2_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR2_MASK3;
+        ram3 |= SLCD_CHAR2_UPDATE3(segments[3]);
+        break;
 
-    case 2:
-      ram0 &= SLCD_CHAR3_MASK0;
-      ram0 |= SLCD_CHAR3_UPDATE0(segments[0]);
+      case 2:
+        ram0 &= SLCD_CHAR3_MASK0;
+        ram0 |= SLCD_CHAR3_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR3_MASK1;
-      ram1 |= SLCD_CHAR3_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR3_MASK1;
+        ram1 |= SLCD_CHAR3_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR3_MASK2;
-      ram2 |= SLCD_CHAR3_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR3_MASK2;
+        ram2 |= SLCD_CHAR3_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR3_MASK3;
-      ram3 |= SLCD_CHAR3_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR3_MASK3;
+        ram3 |= SLCD_CHAR3_UPDATE3(segments[3]);
+        break;
 
-    case 3:
-      ram0 &= SLCD_CHAR4_MASK0;
-      ram0 |= SLCD_CHAR4_UPDATE0(segments[0]);
+      case 3:
+        ram0 &= SLCD_CHAR4_MASK0;
+        ram0 |= SLCD_CHAR4_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR4_MASK1;
-      ram1 |= SLCD_CHAR4_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR4_MASK1;
+        ram1 |= SLCD_CHAR4_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR4_MASK2;
-      ram2 |= SLCD_CHAR4_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR4_MASK2;
+        ram2 |= SLCD_CHAR4_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR4_MASK3;
-      ram3 |= SLCD_CHAR4_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR4_MASK3;
+        ram3 |= SLCD_CHAR4_UPDATE3(segments[3]);
+        break;
 
-    case 4:
-      ram0 &= SLCD_CHAR5_MASK0;
-      ram0 |= SLCD_CHAR5_UPDATE0(segments[0]);
+      case 4:
+        ram0 &= SLCD_CHAR5_MASK0;
+        ram0 |= SLCD_CHAR5_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR5_MASK1;
-      ram1 |= SLCD_CHAR5_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR5_MASK1;
+        ram1 |= SLCD_CHAR5_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR5_MASK2;
-      ram2 |= SLCD_CHAR5_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR5_MASK2;
+        ram2 |= SLCD_CHAR5_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR5_MASK3;
-      ram3 |= SLCD_CHAR5_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR5_MASK3;
+        ram3 |= SLCD_CHAR5_UPDATE3(segments[3]);
+        break;
 
-    case 5:
-      ram0 &= SLCD_CHAR6_MASK0;
-      ram0 |= SLCD_CHAR6_UPDATE0(segments[0]);
+      case 5:
+        ram0 &= SLCD_CHAR6_MASK0;
+        ram0 |= SLCD_CHAR6_UPDATE0(segments[0]);
 
-      ram1 &= SLCD_CHAR6_MASK1;
-      ram1 |= SLCD_CHAR6_UPDATE1(segments[1]);
+        ram1 &= SLCD_CHAR6_MASK1;
+        ram1 |= SLCD_CHAR6_UPDATE1(segments[1]);
 
-      ram2 &= SLCD_CHAR6_MASK2;
-      ram2 |= SLCD_CHAR6_UPDATE2(segments[2]);
+        ram2 &= SLCD_CHAR6_MASK2;
+        ram2 |= SLCD_CHAR6_UPDATE2(segments[2]);
 
-      ram3 &= SLCD_CHAR6_MASK3;
-      ram3 |= SLCD_CHAR6_UPDATE3(segments[3]);
-      break;
+        ram3 &= SLCD_CHAR6_MASK3;
+        ram3 |= SLCD_CHAR6_UPDATE3(segments[3]);
+        break;
 
-    default:
-      return;
-  }
+      default:
+        return;
+    }
 
   putreg32(ram0, STM32_LCD_RAM0L);
   putreg32(ram1, STM32_LCD_RAM1L);
@@ -903,17 +903,17 @@ static void slcd_action(enum slcdcode_e code, uint8_t 
count)
            * and fall through.
            */
 
-           tmp = (int)g_slcdstate.curpos - count;
-           if (tmp < 0)
-             {
-               tmp   = 0;
-               count = g_slcdstate.curpos;
-             }
+          tmp = (int)g_slcdstate.curpos - count;
+          if (tmp < 0)
+            {
+              tmp   = 0;
+              count = g_slcdstate.curpos;
+            }
 
-           /* Save the updated cursor positions */
+          /* Save the updated cursor positions */
 
-           g_slcdstate.curpos = tmp;
-         }
+          g_slcdstate.curpos = tmp;
+        }
 
       case SLCDCODE_FWDDEL:          /* DELete (forward delete) N characters 
moving text */
         if (count > 0)
@@ -1409,6 +1409,7 @@ static int slcd_ioctl(struct file *filep, int cmd, 
unsigned long arg)
       case SLCDIOC_GETCONTRAST:
         {
           int *contrast = (int *)((uintptr_t)arg);
+
           if (!contrast)
             {
               return -EINVAL;
diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c 
b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c
index 910c56bfa66..14b04ebed84 100644
--- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c
+++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_lcd1602.c
@@ -537,22 +537,22 @@ static void lcd_action(enum slcdcode_e code, uint8_t 
count)
               break;
             }
 
-           /* Otherwise, BACKDEL is like moving the cursor back N characters
-            * then doing a forward deletion.
-            * Decrement the cursor position and fall through.
-            */
+          /* Otherwise, BACKDEL is like moving the cursor back N characters
+           * then doing a forward deletion.
+           * Decrement the cursor position and fall through.
+           */
 
-           tmp = (int)g_lcd1602.curcol - count;
-           if (tmp < 0)
-             {
-               tmp   = 0;
-               count = g_lcd1602.curcol;
-             }
+          tmp = (int)g_lcd1602.curcol - count;
+          if (tmp < 0)
+            {
+              tmp   = 0;
+              count = g_lcd1602.curcol;
+            }
 
-           /* Save the updated cursor positions */
+          /* Save the updated cursor positions */
 
-           g_lcd1602.curcol = tmp;
-         }
+          g_lcd1602.curcol = tmp;
+        }
 
       case SLCDCODE_FWDDEL:          /* DELete (forward delete) N characters 
moving text */
         if (count > 0)
@@ -576,6 +576,7 @@ static void lcd_action(enum slcdcode_e code, uint8_t count)
             for (i = g_lcd1602.curcol + nmove; i < LCD_NCOLUMNS - 1; i++)
               {
                 uint8_t ch = lcd_readch(g_lcd1602.currow, i);
+
                 lcd_writech(ch, g_lcd1602.currow, i - nmove);
               }
 
@@ -930,6 +931,7 @@ static int lcd_ioctl(struct file *filep, int cmd, unsigned 
long arg)
       case SLCDIOC_GETBRIGHTNESS:
         {
           int *brightness = (int *)((uintptr_t)arg);
+
           if (!brightness)
             {
               return -EINVAL;

Reply via email to