Re: [PATCH] [v2] cxlflash: fix function pointer cast warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arnd,

> Calling a function through an incompatible pointer type causes breaks
> kcfi, so clang warns about the assignments:
>
> drivers/scsi/cxlflash/main.c:3498:3: error: cast from 'int (*)(struct
> cxlflash_cfg *, struct ht_cxlflash_lun_provision *)' to 'hioctl' (aka
> 'int (*)(struct cxlflash_cfg *, void *)') converts to incompatible
> function type [-Werror,-Wcast-function-type-strict]
>  3498 |                 (hioctl)cxlflash_lun_provision },
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:3500:3: error: cast from 'int (*)(struct
> cxlflash_cfg *, struct ht_cxlflash_afu_debug *)' to 'hioctl' (aka 'int
> (*)(struct cxlflash_cfg *, void *)') converts to incompatible function
> type [-Werror,-Wcast-function-type-strict]
>  3500 |                 (hioctl)cxlflash_afu_debug },
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Address these by changing the functions to have the correct type
> and replace the function pointer cast with a cast of its argument.

Applied to 6.10/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux