Re: [PATCH v1 1/1] HID: intel-ish-hid: Fix a build error in devm_ishtp_alloc_workqueue()
From: Jiri Kosina
Date: Fri Oct 24 2025 - 08:27:52 EST
On Fri, 24 Oct 2025, Andy Shevchenko wrote:
> clang 19 is not happy about the cast and in conjunction with CONFIG_WERROR=y
> (which is default) leads to a build error:
>
> drivers/hid/intel-ish-hid/ipc/ipc.c:935:36: error: cast from 'void (*)(struct workqueue_struct *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 935 | if (devm_add_action_or_reset(dev, (void (*)(void *))destroy_workqueue,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fix this by providing an intermediate callback that has a correct type.
>
> Fixes: 0d30dae38fe0 ("HID: intel-ish-hid: Use dedicated unbound workqueues to prevent resume blocking")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Thanks Andy. Nathan beat you on this one:
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-6.19/intel-ish-v2&id=3644f4411713f52bf231574aa8759e3d8e20b341
--
Jiri Kosina
SUSE Labs