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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9321ed1e530 power: pm: fix nxstyle alignment in pm_runtime.c
9321ed1e530 is described below

commit 9321ed1e5302d57f468a50c328194b4b888d3f4e
Author: Honghao Xiang <[email protected]>
AuthorDate: Fri Nov 27 05:33:15 2026 +0000

    power: pm: fix nxstyle alignment in pm_runtime.c
    
    The switch/case block in rpm_changestate() still uses the old indentation
    and the initialisation assignments in pm_runtime_init() are not aligned,
    so nxstyle rejects the file as soon as a PR touches it.
    
    Whitespace only: reindent the switch to current NuttX style and align the
    assignment operators.  No functional change - git diff -w is empty.
    
    Signed-off-by: Honghao Xiang <[email protected]>
---
 drivers/power/pm/pm_runtime.c | 76 +++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/power/pm/pm_runtime.c b/drivers/power/pm/pm_runtime.c
index 42ec5ae661a..75b6113d54b 100644
--- a/drivers/power/pm/pm_runtime.c
+++ b/drivers/power/pm/pm_runtime.c
@@ -124,41 +124,41 @@ static int rpm_changestate(FAR struct pm_runtime_s *rpm, 
rpm_state_e state)
   int ret = 0;
 
   switch (rpm->state)
-  {
-  case RPM_ACTIVE:
-    if (state == RPM_SUSPENDED)
-      {
-        ret = rpm_suspend(rpm);
-      }
-    else if (state == RPM_SUSPENDING)
-      {
-         ret = work_queue(HPWORK, &rpm->suspend_work,
-                          rpm_autosuspend_cb, rpm,
-                          MSEC2TICK(rpm->suspend_delay));
-      }
-    break;
-
-  case RPM_SUSPENDED:
-    if (state == RPM_ACTIVE)
-      {
-        ret = rpm_resume(rpm);
-      }
-    break;
-
-  case RPM_SUSPENDING:
-    if (state == RPM_ACTIVE)
-      {
-        work_cancel(HPWORK, &rpm->suspend_work);
-      }
-    else if (state == RPM_SUSPENDED)
-      {
-        ret = rpm_suspend(rpm);
-      }
-    break;
-
-  default:
-    break;
-  }
+    {
+      case RPM_ACTIVE:
+        if (state == RPM_SUSPENDED)
+          {
+            ret = rpm_suspend(rpm);
+          }
+        else if (state == RPM_SUSPENDING)
+          {
+            ret = work_queue(HPWORK, &rpm->suspend_work,
+                             rpm_autosuspend_cb, rpm,
+                             MSEC2TICK(rpm->suspend_delay));
+          }
+        break;
+
+      case RPM_SUSPENDED:
+        if (state == RPM_ACTIVE)
+          {
+            ret = rpm_resume(rpm);
+          }
+        break;
+
+      case RPM_SUSPENDING:
+        if (state == RPM_ACTIVE)
+          {
+            work_cancel(HPWORK, &rpm->suspend_work);
+          }
+        else if (state == RPM_SUSPENDED)
+          {
+            ret = rpm_suspend(rpm);
+          }
+        break;
+
+      default:
+        break;
+    }
 
   return ret;
 }
@@ -188,10 +188,10 @@ void pm_runtime_init(FAR struct pm_runtime_s *rpm, 
rpm_state_e state,
   DEBUGASSERT(rpm != NULL && ops != NULL);
   DEBUGASSERT(state == RPM_ACTIVE || state == RPM_SUSPENDED);
   nxrmutex_init(&rpm->lock);
-  rpm->use_count = 0;
+  rpm->use_count     = 0;
   rpm->suspend_delay = 0;
-  rpm->state = state;
-  rpm->ops = ops;
+  rpm->state         = state;
+  rpm->ops           = ops;
 }
 
 /****************************************************************************

Reply via email to