linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] time: hrtimer: Remove unnecessary ‘0’ values from ret
@ 2023-06-27 17:58 Li kunyu
  0 siblings, 0 replies; 3+ messages in thread
From: Li kunyu @ 2023-06-27 17:58 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Li kunyu

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

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e8c08292defc..9f90e76c6cd9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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;
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] time: hrtimer: Remove unnecessary ‘0’ values from ret
@ 2023-07-25 19:56 Li zeming
  2023-07-24 16:06 ` Mukesh Ojha
  0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2023-07-25 19:56 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Li zeming

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

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e8c08292defc..9f90e76c6cd9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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;
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] time: hrtimer: Remove unnecessary ‘0’ values from ret
  2023-07-25 19:56 Li zeming
@ 2023-07-24 16:06 ` Mukesh Ojha
  0 siblings, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2023-07-24 16:06 UTC (permalink / raw)
  To: Li zeming, tglx; +Cc: linux-kernel



On 7/26/2023 1:26 AM, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh

> ---
>   kernel/time/hrtimer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
> index e8c08292defc..9f90e76c6cd9 100644
> --- a/kernel/time/hrtimer.c
> +++ b/kernel/time/hrtimer.c
> @@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-24 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 17:58 [PATCH] time: hrtimer: Remove unnecessary ‘0’ values from ret Li kunyu
2023-07-25 19:56 Li zeming
2023-07-24 16:06 ` Mukesh Ojha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).