lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] [v2] cxlflash: fix function pointer cast warnings
Date
On Thu, 04 Apr 2024 18:14:58 +0200, Arnd Bergmann wrote:

> 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 },
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]

Applied to 6.10/scsi-queue, thanks!

[1/1] cxlflash: fix function pointer cast warnings
https://git.kernel.org/mkp/scsi/c/28fc2bd2c729

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2024-05-27 16:30    [W:0.635 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site