[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71924012-8955-92f2-5fcc-4632a01bba29@linaro.org>
Date: Tue, 10 Jan 2023 09:26:50 +0100
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Miles Chen <miles.chen@...iatek.com>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] firmware: meson_sm: stop using 0 as NULL pointer
On 10/01/2023 04:12, Miles Chen wrote:
> Use NULL for NULL pointer to fix the following sparse warning:
> drivers/firmware/meson/meson_sm.c:85:24: sparse: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Miles Chen <miles.chen@...iatek.com>
> ---
> drivers/firmware/meson/meson_sm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
> index 77aa5c6398aa..3f5ff9ed668e 100644
> --- a/drivers/firmware/meson/meson_sm.c
> +++ b/drivers/firmware/meson/meson_sm.c
> @@ -82,7 +82,7 @@ static void __iomem *meson_sm_map_shmem(u32 cmd_shmem, unsigned int size)
>
> sm_phy_base = __meson_sm_call(cmd_shmem, 0, 0, 0, 0, 0);
> if (!sm_phy_base)
> - return 0;
> + return NULL;
>
> return ioremap_cache(sm_phy_base, size);
> }
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists