[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPoxVqxevopRpPu1@stanley.mountain>
Date: Thu, 23 Oct 2025 16:44:54 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: dan.j.williams@...el.com
Cc: Ally Heev <allyheev@...il.com>, Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Joe Perches <joe@...ches.com>, Jonathan Corbet <corbet@....net>,
Andy Whitcroft <apw@...onical.com>, workflows@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
David Hunter <david.hunter.linux@...il.com>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] checkpatch: add uninitialized pointer with __free
attribute check
On Tue, Oct 21, 2025 at 09:43:28AM -0700, dan.j.williams@...el.com wrote:
> I would go futher and suggest that the pattern of:
>
> type foo __free(free_foo) = NULL;
>
> ...be made into a warning because that easily leads to situations where
> declaration order is out of sync with allocation order. I.e. can be made
> technically correct, but at a level of cleverness that undermines the
> benefit.
To be honest, I'm not sure what you're saying here...
I have written code like this. There are 515 places which use this
format. I think it would be a controversial change.
$ git grep __free | grep "= NULL" | wc -l
515
regards,
dan carpenter
Powered by blists - more mailing lists