From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Manoj N. Kumar" <manoj@linux.ibm.com>,
"Matthew R. Ochs" <mrochs@linux.ibm.com>,
Uma Krishnan <ukrishn@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Arnd Bergmann <arnd@arndb.de>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] [v2] cxlflash: fix function pointer cast warnings
Date: Fri, 05 Apr 2024 21:27:45 -0400 [thread overview]
Message-ID: <yq1il0vqnzv.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20240404161524.3473857-1-arnd@kernel.org> (Arnd Bergmann's message of "Thu, 4 Apr 2024 18:14:58 +0200")
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
next prev parent reply other threads:[~2024-04-06 1:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 16:14 [PATCH] [v2] cxlflash: fix function pointer cast warnings Arnd Bergmann
2024-04-06 1:27 ` Martin K. Petersen [this message]
2024-04-09 3:08 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1il0vqnzv.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=manoj@linux.ibm.com \
--cc=morbo@google.com \
--cc=mrochs@linux.ibm.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=ukrishn@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox