diff options
author | Arnd Bergmann <arnd@arndb.de> | 2024-04-04 19:14:58 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-04-08 22:08:52 +0300 |
commit | 28fc2bd2c7298d647fcbab7b11532a1f5fda7470 (patch) | |
tree | dbe2c42185da88d11ead4d02c2fb0e3c5db93f77 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 33507b3964f136ea1592718cb81885c8f9354f65 (diff) | |
download | linux-28fc2bd2c7298d647fcbab7b11532a1f5fda7470.tar.xz |
scsi: cxlflash: Fix function pointer cast warnings
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.
Link: https://lore.kernel.org/lkml/20240326145140.3257163-6-arnd@kernel.org/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240404161524.3473857-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions