Skip to contentSkip to conversation

sched/core: fix coding style issues

PATCH In review Jahan Zaib Ashraf Mir 2 participants 2 messages Oct 2 – Oct 5 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/core: fix coding style issues

Fix three checkpatch warnings in sched/core.c:
- Use 'unsigned int' instead of bare 'unsigned' for mode parameter in default_wake_function()
- Add missing blank line after variable declaration in __sched_setscheduler()
- Add missing blank line after variable declaration in sched_dynamic_update()

---
 kernel/sched/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/core.c +3 -1
index e8c46f849f6e..9bd1bf3d7729 100644
@@ -4723,6 +4723,7 @@ void force_schedstat_enabled(void)
 static int __init setup_schedstats(char *str)
 {
 	int ret = 0;
+
 	if (!str)
 		goto out;
 
@@ -7611,7 +7612,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
 	exception_exit(prev_state);
 }
 
-int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
+int default_wake_function(wait_queue_entry_t *curr, unsigned int mode, int wake_flags,
 			  void *key)
 {
 	WARN_ON_ONCE(wake_flags & ~(WF_SYNC|WF_CURRENT_CPU));
@@ -8087,6 +8088,7 @@ static int __init setup_preempt_mode(char *str)
 {
 	int mode = sched_dynamic_mode(str);
 	if (mode < 0) {
+
 		pr_warn("Dynamic Preempt: unsupported mode: %s\n", str);
 		return 0;
 	}
Signature · 1 line
2.56.0
#1 lore raw

Hi Jahan,

Quoted 3 lines · On Fri, Oct 02, 2026 at 07:06:26PM +0530 Jahan Zaib Ashraf Mir wrote:

Fix three checkpatch warnings in sched/core.c:
- Use 'unsigned int' instead of bare 'unsigned' for mode parameter in default_wake_function()

Probably not worth making this change. And even if it was worth it it would be good to make it all match (see wait.h).

Quoted 4 lines

- Add missing blank line after variable declaration in __sched_setscheduler()
- Add missing blank line after variable declaration in sched_dynamic_update()

No need for a patch to justc change whitespace.

Cheers,
Phil

Quoted 39 lines
---
 kernel/sched/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/sched/core.c +3 -1
index e8c46f849f6e..9bd1bf3d7729 100644
@@ -4723,6 +4723,7 @@ void force_schedstat_enabled(void)
 static int __init setup_schedstats(char *str)
 {
 	int ret = 0;
+
 	if (!str)
 		goto out;
 
@@ -7611,7 +7612,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
 	exception_exit(prev_state);
 }
 
-int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
+int default_wake_function(wait_queue_entry_t *curr, unsigned int mode, int wake_flags,
 			  void *key)
 {
 	WARN_ON_ONCE(wake_flags & ~(WF_SYNC|WF_CURRENT_CPU));
@@ -8087,6 +8088,7 @@ static int __init setup_preempt_mode(char *str)
 {
 	int mode = sched_dynamic_mode(str);
 	if (mode < 0) {
+
 		pr_warn("Dynamic Preempt: unsupported mode: %s\n", str);
 		return 0;
 	}
Signature · 1 line
2.56.0