Skip to contentSkip to conversation

PM: Remove the mention of freezer_count() in comment

PATCH In review Kevin Hao 2 participants 3 messages Dec 16, 2023 – Dec 20, 2023

Subsystems (2)
lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

PATCH 1/1 PM: Remove the mention of freezer_count() in comment

The freezer_count() has been removed by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic").

---
 kernel/power/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/power/main.c +1 -2
index f6425ae3e8b0..768c07155d53 100644
@@ -61,8 +61,7 @@ EXPORT_SYMBOL_GPL(lock_system_sleep);
 void unlock_system_sleep(unsigned int flags)
 {
 	/*
-	 * Don't use freezer_count() because we don't want the call to
-	 * try_to_freeze() here.
+	 * Don't call try_to_freeze() here.
 	 *
 	 * Reason:
 	 * Fundamentally, we just don't need it, because freezing condition
Signature · 1 line
2.39.2
#1 lore raw
Quoted 14 lines · Kevin Hao

The freezer_count() has been removed by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic").

---
 kernel/power/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/power/main.c +0 -0
index f6425ae3e8b0..768c07155d53 100644

kernel/power/main.c EXPORT_SYMBOL_GPL(lock_system_sleep); · line 67

Quoted 9 lines
kernel/power/main.c +1 -2
@@ -61,8 +61,7 @@ EXPORT_SYMBOL_GPL(lock_system_sleep);
 void unlock_system_sleep(unsigned int flags)
 {
        /*
-        * Don't use freezer_count() because we don't want the call to
-        * try_to_freeze() here.
+        * Don't call try_to_freeze() here.
         *
         * Reason:
         * Fundamentally, we just don't need it, because freezing condition

IMV, it would be better to remove the entire comment from unlock_system_sleep(), because there is no particular purpose for having it after the freezer changes.

author
#2 lore raw
Quoted 20 lines · Rafael J. Wysocki
Quoted 19 lines · Kevin Hao

The freezer_count() has been removed by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic").

---
 kernel/power/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/power/main.c +0 -2
index f6425ae3e8b0..768c07155d53 100644
@@ -61,8 +61,7 @@ EXPORT_SYMBOL_GPL(lock_system_sleep);
 void unlock_system_sleep(unsigned int flags)
 {
        /*
-        * Don't use freezer_count() because we don't want the call to
-        * try_to_freeze() here.
Quoted 8 lines

kernel/power/main.c EXPORT_SYMBOL_GPL(lock_system_sleep); · line 67

Quoted 4 lines
kernel/power/main.c +1 -0
+        * Don't call try_to_freeze() here.
         *
         * Reason:
         * Fundamentally, we just don't need it, because freezing condition

IMV, it would be better to remove the entire comment from unlock_system_sleep(), because there is no particular purpose for having it after the freezer changes.

Sure. V2 is coming.

Thanks,
Kevin