Skip to contentSkip to conversation

time: hrtimer: Remove unnecessary ‘0’ values from ret

PATCH In review Li zeming 2 participants 2 messages Jul 24, 2023 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 time: hrtimer: Remove unnecessary ‘0’ values from ret

ret is assigned first, so it does not need to initialize the assignment.

---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/hrtimer.c +1 -1
index e8c08292defc..9f90e76c6cd9 100644
@@ -2085,7 +2085,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
 {
 	struct restart_block *restart;
 	struct hrtimer_sleeper t;
-	int ret = 0;
+	int ret;
 	u64 slack;
 
 	slack = current->timer_slack_ns;
Signature · 1 line
2.18.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Li zeming

ret is assigned first, so it does not need to initialize the assignment.

-Mukesh

Quoted 17 lines
---
  kernel/time/hrtimer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/hrtimer.c +1 -1
index e8c08292defc..9f90e76c6cd9 100644
@@ -2085,7 +2085,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode,
  {
  	struct restart_block *restart;
  	struct hrtimer_sleeper t;
-	int ret = 0;
+	int ret;
  	u64 slack;
 
  	slack = current->timer_slack_ns;