[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<DS0PR02MB10250A0BFDC4427C980A29CC1B8592@DS0PR02MB10250.namprd02.prod.outlook.com>
Date: Tue, 12 Nov 2024 16:19:33 +0000
From: Brian Cain <bcain@...cinc.com>
To: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC: Nathan Chancellor <nathan@...nel.org>,
"linux-hexagon@...r.kernel.org"
<linux-hexagon@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>,
Sid Manning <sidneym@...cinc.com>
Subject: RE: [PATCH] hexagon: time: Remove redundant null check for resource
> -----Original Message-----
> From: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
> Sent: Monday, November 11, 2024 8:24 AM
> To: akpm@...ux-foundation.org; Brian Cain <bcain@...cinc.com>
> Cc: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>; Nathan
> Chancellor <nathan@...nel.org>; linux-hexagon@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: [PATCH] hexagon: time: Remove redundant null check for resource
>
>
> Null check for 'resource' before assignment is unnecessary because the
> variable 'resource' is initialized to NULL at the beginning of the function.
>
> Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>
> ---
Acked-by: Brian Cain <bcain@...cinc.com>
> arch/hexagon/kernel/time.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
> index f0f207e2a694..6f851e1cd4ee 100644
> --- a/arch/hexagon/kernel/time.c
> +++ b/arch/hexagon/kernel/time.c
> @@ -170,8 +170,7 @@ static void __init time_init_deferred(void)
>
> ce_dev->cpumask = cpu_all_mask;
>
> - if (!resource)
> - resource = rtos_timer_device.resource;
> + resource = rtos_timer_device.resource;
>
> /* ioremap here means this has to run later, after paging init */
> rtos_timer = ioremap(resource->start, resource_size(resource));
> --
> 2.43.0
Powered by blists - more mailing lists