time: alarmtimer: remove unnecessary ‘0’ values from ret
PATCH 1/1 time: alarmtimer: remove unnecessary ‘0’ values from ret
ret is assigned first, so it does not need to initialize the assignment.
Signed-off-by Li zeming <[email protected]>
--- kernel/time/alarmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/alarmtimer.c +1 -1
@@ -847,7 +847,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,struct restart_block *restart = ¤t->restart_block;struct alarm alarm;ktime_t exp; -int ret =0 ; +int ret;if (!alarmtimer_get_rtcdev ())return -EOPNOTSUPP ;
Signature · 1 line
2.18.2
[tip: timers/core] alarmtimer: Remove unnecessary initialization of variable 'ret'
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: ace380b014f338834d55082820a475e7c5b2c952 Gitweb: https://git.kernel.org/tip/ace380b014f338834d55082820a475e7c5b2c952 Author: Li zeming <[email protected]> AuthorDate: Sat, 10 Jun 2023 02:28:56 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Sat, 10 Jun 2023 14:36:17 +02:00
alarmtimer: Remove unnecessary initialization of variable 'ret'
ret is assigned before checked, so it does not need to initialize the variable
Signed-off-by Li zeming <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- kernel/time/alarmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/alarmtimer.c +1 -1
@@ -847,7 +847,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,struct restart_block *restart = ¤t->restart_block;struct alarm alarm;ktime_t exp; -int ret =0 ; +int ret;if (!alarmtimer_get_rtcdev ())return -EOPNOTSUPP ;
[tip: timers/core] alarmtimer: Remove unnecessary initialization of variable 'ret'
In reply to Li zemingThe following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 986af8dc5af834071a8a7afdf2c3b7a57d562df2 Gitweb: https://git.kernel.org/tip/986af8dc5af834071a8a7afdf2c3b7a57d562df2 Author: Li zeming <[email protected]> AuthorDate: Sat, 10 Jun 2023 02:28:56 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Sun, 18 Jun 2023 22:41:53 +02:00
alarmtimer: Remove unnecessary initialization of variable 'ret'
ret is assigned before checked, so it does not need to initialize the variable
Signed-off-by Li zeming <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- kernel/time/alarmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/alarmtimer.c +1 -1
@@ -847,7 +847,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,struct restart_block *restart = ¤t->restart_block;struct alarm alarm;ktime_t exp; -int ret =0 ; +int ret;if (!alarmtimer_get_rtcdev ())return -EOPNOTSUPP ;