• Simon Horman's avatar
    i2c: mchp-pci1xxxx: Avoid cast to incompatible function type · 7ebfd881
    Simon Horman authored
    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: default avatarSimon Horman <horms@kernel.org>
    Reviewed-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
    Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
    Reviewed-by: Tharun Kumar P<tharunkumar.pasumarthi@microchip.com>
    Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
    7ebfd881
i2c-mchp-pci1xxxx.c 33 KB