Skip to contentSkip to conversation

kthread: Modify the ret variable type to bool

PATCH New Li kunyu 1 participant 1 message Nov 1, 2023

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 kthread: Modify the ret variable type to bool

The value of ret assigned as bool type, and when combined with the function return type ret, it should be defined as bool.

---
 kernel/kthread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/kthread.c +2 -2
index 1eea53050babc..9204693e07c68 100644
@@ -1241,7 +1241,7 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker,
 {
 	struct kthread_work *work = &dwork->work;
 	unsigned long flags;
-	int ret;
+	bool ret;
 
 	raw_spin_lock_irqsave(&worker->lock, flags);
 
@@ -1286,7 +1286,7 @@ static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork)
 {
 	struct kthread_worker *worker = work->worker;
 	unsigned long flags;
-	int ret = false;
+	bool ret = false;
 
 	if (!worker)
 		goto out;
Signature · 1 line
2.18.2