[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZD9/7Oed8Rujjj/0@kernel.org>
Date: Wed, 19 Apr 2023 07:45:16 +0200
From: Simon Horman <horms@...nel.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Nishanth Menon <nm@...com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Tom Rix <trix@...hat.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] soc: ti: pruss: Avoid cast to incompatible function type
On Tue, Apr 18, 2023 at 11:44:28AM -0700, Nick Desaulniers wrote:
> On Tue, Apr 18, 2023 at 4:41 AM Simon Horman <horms@...nel.org> wrote:
> >
> > Rather than casting clk_unregister_mux to an incompatible function
> > type provide a trivial wrapper with the correct signature for the
> > use-case.
> >
> > Reported by clang-16 with W=1:
> >
> > drivers/soc/ti/pruss.c:158:38: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> > ret = devm_add_action_or_reset(dev, (void(*)(void *))clk_unregister_mux,
> >
> > No functional change intended.
> > Compile tested only.
>
> Thanks for the patch!
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>
> Here's some more suspects to look at, if you have cycles:
> drivers/base/devres.c:734:int __devm_add_action(struct device *dev,
> void (*action)(void *), void *data, const char *name)
> drivers/i2c/busses/i2c-mchp-pci1xxxx.c:1159: ret =
> devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
> drivers/soc/ti/pruss.c:96: ret = devm_add_action_or_reset(dev,
> (void(*)(void *))clk_unregister_mux,
> drivers/mmc/host/meson-mx-sdhc-mmc.c:791: ret =
> devm_add_action_or_reset(dev, (void(*)(void *))mmc_free_host,
> drivers/pci/controller/pcie-microchip-host.c:866:
> devm_add_action_or_reset(dev, (void (*) (void
> *))clk_disable_unprepare,
Thanks, I will take a look as a background task.
Let me know if there is any urgency on your side.
...
Powered by blists - more mailing lists