[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8735049wzn.ffs@tglx>
Date: Sun, 27 Aug 2023 20:11:08 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Li zeming <zeming@...china.com>, jstultz@...gle.com,
sboyd@...nel.org
Cc: linux-kernel@...r.kernel.org, Li zeming <zeming@...china.com>
Subject: Re: [PATCH] kernel: time: clocksource: Remove unnecessary
‘0’
values from ret
On Wed, Aug 09 2023 at 01:36, Li zeming wrote:
> ret is assigned first, so it does not need to initialize the
> assignment.
> Signed-off-by: Li zeming <zeming@...china.com>
> ---
> kernel/time/clocksource.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index 91836b727cef..b4ad38812ef7 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -1289,7 +1289,7 @@ static int clocksource_unbind(struct clocksource *cs)
> */
> int clocksource_unregister(struct clocksource *cs)
> {
> - int ret = 0;
> + int ret;
>
> mutex_lock(&clocksource_mutex);
> if (!list_empty(&cs->list))
ret is only assigned a value when cs->list is not empty.
Can you please fix your analyzer or at least validate by inspection
whether your analyzer is correct?
While at it, please follow the instructions at:
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-submission-notes
Thanks,
tglx
Powered by blists - more mailing lists