soc: apple: rtkit: Stop casting function pointer signatures
PATCH 1/1 soc: apple: rtkit: Stop casting function pointer signatures
Fixes 9bd1d9a0d8bb ("soc: apple: Add RTKit IPC library")
Reported-by kernel test robot <[email protected]>
Signed-off-by Sven Peter <[email protected]>
--- drivers/soc/apple/rtkit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/soc/apple/rtkit.c +4 -3
@@ -922,8 +922,10 @@ int apple_rtkit_wake(struct apple_rtkit *rtk) }EXPORT_SYMBOL_GPL (apple_rtkit_wake); -static void apple_rtkit_free (struct apple_rtkit *rtk) +static void apple_rtkit_free (void *data) { +struct apple_rtkit *rtk = data; +mbox_free_channel (rtk->mbox_chan);destroy_workqueue (rtk->wq);
@@ -946,8 +948,7 @@ struct apple_rtkit *devm_apple_rtkit_init(struct device *dev, void *cookie,if (IS_ERR (rtk))return rtk; - ret =devm_add_action_or_reset (dev, (void (*)(void *))apple_rtkit_free, - rtk); + ret =devm_add_action_or_reset (dev, apple_rtkit_free, rtk);if (ret)return ERR_PTR (ret);
Signature · 1 line
2.25.1
Hector Martin
AppliedQuoted 24 lines · Sven Peter
Fixes 9bd1d9a0d8bb ("soc: apple: Add RTKit IPC library")Reported-by kernel test robot <[email protected]>Signed-off-by Sven Peter <[email protected]>--- drivers/soc/apple/rtkit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/soc/apple/rtkit.c +3
-1@@ -922,8 +922,10 @@ int apple_rtkit_wake(struct apple_rtkit *rtk) }EXPORT_SYMBOL_GPL (apple_rtkit_wake); -static void apple_rtkit_free (struct apple_rtkit *rtk) +static void apple_rtkit_free (void *data) { +struct apple_rtkit *rtk = data; +mbox_free_channel (rtk->mbox_chan);destroy_workqueue (rtk->wq);
drivers/soc/apple/rtkit.c struct apple_rtkit *devm_apple_rtkit_init(struct device *dev, void *cookie, · line 954
Quoted 9 lines
drivers/soc/apple/rtkit.c +1
-2@@ -946,8 +948,7 @@ struct apple_rtkit *devm_apple_rtkit_init(struct device *dev, void *cookie,if (IS_ERR (rtk))return rtk; - ret =devm_add_action_or_reset (dev, (void (*)(void *))apple_rtkit_free, - rtk); + ret =devm_add_action_or_reset (dev, apple_rtkit_free, rtk);if (ret)return ERR_PTR (ret);
Applied to asahi-soc/soc, thanks!
- Hector