[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCCELS7ss0KBW+iHeevVWQzO4Sz6vTP4=E01u3+o73-HBw@mail.gmail.com>
Date: Thu, 15 Feb 2024 23:00:02 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Jerome Brunet <jbrunet@...libre.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, Arnd Bergmann <arnd@...db.de>,
Neil Armstrong <neil.armstrong@...aro.org>, Kevin Hilman <khilman@...libre.com>,
Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Jernej Skrabec <jernej.skrabec@...il.com>, linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH v2] nvmem: meson-efuse: fix function pointer type mismatch
On Tue, Feb 13, 2024 at 3:28 PM Jerome Brunet <jbrunet@...libre.com> wrote:
>
> clang-16 warns about casting functions to incompatible types, as is done
> here to call clk_disable_unprepare:
>
> drivers/nvmem/meson-efuse.c:78:12: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 78 | (void(*)(void *))clk_disable_unprepare,
>
> The pattern of getting, enabling and setting a disable callback for a
> clock can be replaced with devm_clk_get_enabled(), which also fixes
> this warning.
>
> Fixes: 611fbca1c861 ("nvmem: meson-efuse: add peripheral clock")
> Reported-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Thanks Jerome!
Powered by blists - more mailing lists