[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e1ec2f8c-c1e9-4459-a6d4-c14ca57404fe@app.fastmail.com>
Date: Tue, 26 Mar 2024 17:02:11 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Timur Tabi" <ttabi@...dia.com>, "Masahiro Yamada" <masahiroy@...nel.org>,
"kherbst@...hat.com" <kherbst@...hat.com>,
"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
"Arnd Bergmann" <arnd@...nel.org>, "Lyude Paul" <lyude@...hat.com>,
"bskeggs@...hat.com" <bskeggs@...hat.com>, "Dave Airlie" <airlied@...il.com>,
"Danilo Krummrich" <dakr@...hat.com>,
"Nathan Chancellor" <nathan@...nel.org>, "Daniel Vetter" <daniel@...ll.ch>
Cc: "Justin Stitt" <justinstitt@...gle.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"Bill Wendling" <morbo@...gle.com>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"Nicolas Schier" <nicolas@...sle.eu>,
"Nick Desaulniers" <ndesaulniers@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: Re: [PATCH 06/12] nouveau: fix function cast warning
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
Powered by blists - more mailing lists