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

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

commit 23e63e8a98d219061e49656aad8314efb539d8dd
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 19 00:44:16 2026 +0200

    testing/drivers/rpmsgdev: Fix the style errors in testdev.c.
    
    Fix the indentation of two switch statements and an if/else block that
    tools/checkpatch.sh reports, and the typo "regist" in the usage text.
    The code does not change.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 testing/drivers/rpmsgdev/testdev.c | 78 +++++++++++++++++++-------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/testing/drivers/rpmsgdev/testdev.c 
b/testing/drivers/rpmsgdev/testdev.c
index 15a618a24..a00a64e52 100644
--- a/testing/drivers/rpmsgdev/testdev.c
+++ b/testing/drivers/rpmsgdev/testdev.c
@@ -202,17 +202,17 @@ static int testdev_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
           }
         else
           {
-           if (*(int *)arg == IOCTL_ARG)
-             {
-               ret = RET;
-             }
-           else
-             {
-               syslog(LOG_ERR, "test ioctl fail, cmd %d(except %d), "
-                      "whence %d(expect %d)\n",
-                      cmd, IOCTL, *(int *)arg, IOCTL_ARG);
-               ret = -1;
-             }
+            if (*(int *)arg == IOCTL_ARG)
+              {
+                ret = RET;
+              }
+            else
+              {
+                syslog(LOG_ERR, "test ioctl fail, cmd %d(except %d), "
+                       "whence %d(expect %d)\n",
+                       cmd, IOCTL, *(int *)arg, IOCTL_ARG);
+                ret = -1;
+              }
           }
         break;
       default:
@@ -253,7 +253,7 @@ static void _register_driver(int mode, char *cpu, char 
*remotepath,
           }
 
         ret = register_driver(remotepath, &g_testdev_ops, 0666, NULL);
-      break;
+        break;
 #ifdef CONFIG_DEV_RPMSG
       case 1:
         if (cpu == NULL || remotepath == NULL || localpath == NULL)
@@ -263,7 +263,7 @@ static void _register_driver(int mode, char *cpu, char 
*remotepath,
           }
 
         ret = rpmsgdev_register(cpu, remotepath, localpath, 0);
-      break;
+        break;
 #endif
       case 2:
 #ifdef CONFIG_DEV_RPMSG_SERVER
@@ -275,13 +275,13 @@ static void _register_driver(int mode, char *cpu, char 
*remotepath,
 
         ret = rpmsgdev_export(cpu, localpath);
 #else
-      syslog(LOG_WARNING, "feature of case %d not enabled\n", mode);
+        syslog(LOG_WARNING, "feature of case %d not enabled\n", mode);
 #endif
-      break;
+        break;
       default:
-      syslog(LOG_ERR, "-d must between 0 and 2\n");
+        syslog(LOG_ERR, "-d must between 0 and 2\n");
         exit(1);
-      break;
+        break;
     }
 
   if (ret < 0)
@@ -715,9 +715,9 @@ static int testcase_8(char *path)
 static void show_usage(void)
 {
   syslog(LOG_WARNING,
-         "Usage: CMD [-d <regist driver>] [-c <remote cpu>] "
+         "Usage: CMD [-d <register driver>] [-c <remote cpu>] "
          "[-l <localpath>] [-r <remotepath>] [-h <hour>] [-t <test>]\n"
-         "\t\t-d: regist driver\n"
+         "\t\t-d: register driver\n"
          "\t\t\t 0 for test driver\n"
          "\t\t\t 1 for rpmsgdev(client register)\n"
          "\t\t\t 2 for rpmsgdev(server export)\n"
@@ -766,27 +766,27 @@ int main(int argc, char *argv[])
         {
           case 'd':
             mode = atoi(optarg);
-          break;
+            break;
           case 'c':
             cpu = optarg;
-          break;
+            break;
           case 'l':
             localpath = optarg;
-          break;
+            break;
           case 'r':
             remotepath = optarg;
-          break;
+            break;
           case 't':
             test = atoi(optarg);
-          break;
+            break;
           case 'h':
             hour = atoi(optarg);
-          break;
+            break;
           default:
             show_usage();
-          break;
-      }
-  }
+            break;
+        }
+    }
 
   if (mode >= 0)
     {
@@ -808,35 +808,35 @@ int main(int argc, char *argv[])
         {
           case 1:
             ret = testcase_1(localpath);
-          break;
+            break;
           case 2:
             ret = testcase_2(localpath);
-          break;
+            break;
           case 3:
             ret = testcase_3(localpath);
-          break;
+            break;
 #ifdef __NuttX__
           case 4:
             ret = testcase_4(localpath);
-          break;
+            break;
 #endif
           case 5:
             ret = testcase_5(localpath);
-          break;
+            break;
           case 6:
             ret = testcase_6(localpath);
-          break;
+            break;
           case 7:
             ret = testcase_7(localpath);
-          break;
+            break;
           case 8:
             ret = testcase_8(localpath);
-          break;
+            break;
           default:
             syslog(LOG_ERR, "-t out of range\n");
             exit(1);
-          break;
-      }
+            break;
+        }
 
       if (ret == 0)
         {
@@ -846,7 +846,7 @@ int main(int argc, char *argv[])
         {
           syslog(LOG_INFO, "TEST FAIL, expect 0 (ret %d)\n", ret);
         }
-  }
+    }
 #endif
 
   return 0;

Reply via email to