On Wed, May 10, 2023 at 02:32:17PM +0200, Simon Horman wrote: > Rather than casting pci1xxxx_i2c_shutdown to an incompatible function type, > update the type to match that expected by __devm_add_action. > > Reported by clang-16 with W-1: > > .../i2c-mchp-pci1xxxx.c:1159:29: error: cast from 'void (*)(struct pci1xxxx_i2c *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ./include/linux/device.h:251:29: note: expanded from macro 'devm_add_action' > __devm_add_action(release, action, data, #action) > ^~~~~~ > > No functional change intended. > Compile tested only. > > Signed-off-by: Simon Horman <horms@xxxxxxxxxx> Applied to for-current, thanks!
Attachment:
signature.asc
Description: PGP signature