Re: [PATCH v3 4/4] leds: Add virtualcolor LED group driver

Nathan Chancellor
2025-10-22T16:20:03Z

On Mon, Oct 20, 2025 at 11:29:28AM +0800, kernel test robot wrote:
...
> url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Brophy/dt-bindings-Add-virtualcolor-class-dt-bindings-documentation/20251019-172647
> base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
> patch link: https://lore.kernel.org/r/20251019092331.49531-5-professorjonny98%40gmail.com
> patch subject: [PATCH v3 4/4] leds: Add virtualcolor LED group driver
> config: i386-randconfig-001-20251020 (https://download.01.org/0day-ci/archive/20251020/202510201144.TwTDnjSJ-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251020/202510201144.TwTDnjSJ-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510201144.TwTDnjSJ-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/leds/rgb/leds-group-virtualcolor.c:463:38: warning: cast from 'void (*)(struct mutex *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
> 463 | ret = devm_add_action_or_reset(dev, (void (*)(void *))mutex_destroy,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/device/devres.h:166:34: note: expanded from macro 'devm_add_action_or_reset'
> 166 | __devm_add_action_or_reset(dev, action, data, #action)
> | ^~~~~~
> 1 warning generated.

This should use a dedicated wrapper function like a patch that I just
sent for the same issue in another driver [1] to avoid a kernel control
flow integrity violation at run time with CONFIG_CFI=y.

[1]: https://lore.kernel.org/20251022-ishtp-fix-function-cast-warn-v1-1-bfb06464f8ca@kernel.org/

Cheers,
Nathan