From: "Arnd Bergmann" <arnd@arndb.de>
To: "Timur Tabi" <ttabi@nvidia.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"kherbst@redhat.com" <kherbst@redhat.com>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>,
"Lyude Paul" <lyude@redhat.com>,
"bskeggs@redhat.com" <bskeggs@redhat.com>,
"Dave Airlie" <airlied@gmail.com>,
"Danilo Krummrich" <dakr@redhat.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Daniel Vetter" <daniel@ffwll.ch>
Cc: "Justin Stitt" <justinstitt@google.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Bill Wendling" <morbo@google.com>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>
Subject: Re: [PATCH 06/12] nouveau: fix function cast warning
Date: Tue, 26 Mar 2024 17:02:11 +0100 [thread overview]
Message-ID: <e1ec2f8c-c1e9-4459-a6d4-c14ca57404fe@app.fastmail.com> (raw)
In-Reply-To: <ddd9519fa51f95eb14a6dd3f2a4b7d67ae7e47a9.camel@nvidia.com>
On Tue, Mar 26, 2024, at 16:20, Timur Tabi wrote:
> On Tue, 2024-03-26 at 15:51 +0100, Arnd Bergmann wrote:
>> Calling a function through an incompatible pointer type causes breaks
>> kcfi, so clang warns about the assignment:
>>
>
> ...
>
>> +static void of_fini(void *p)
>> +{
>> + return kfree(p);
>> +}
>> +
>
> I don't know anything about kfci, but shouldn't this just be "kfree(p)",
> without the "return"?
You are right, fixed this up locally now, waiting for more
comments before I resend patches from my series.
I think it works because of a gcc extension, but isn't
valid C otherwise, and I did not mean to rely on this.
Arnd
prev parent reply other threads:[~2024-03-26 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 14:47 [PATCH 00/12] kbuild: enable some -Wextra warnings by default Arnd Bergmann
2024-03-26 14:51 ` [PATCH 06/12] nouveau: fix function cast warning Arnd Bergmann
2024-03-26 15:20 ` Timur Tabi
2024-03-26 16:02 ` Arnd Bergmann [this message]
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=e1ec2f8c-c1e9-4459-a6d4-c14ca57404fe@app.fastmail.com \
--to=arnd@arndb.de \
--cc=airlied@gmail.com \
--cc=arnd@kernel.org \
--cc=bskeggs@redhat.com \
--cc=dakr@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=justinstitt@google.com \
--cc=kherbst@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lyude@redhat.com \
--cc=masahiroy@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=nouveau@lists.freedesktop.org \
--cc=ttabi@nvidia.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).