* Re: [Cocci] Subject: [RFC] clang tooling cleanups
[not found] <20201027164255.1573301-1-trix@redhat.com>
@ 2020-11-10 2:52 ` Joe Perches
2020-11-10 13:12 ` Tom Rix
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2020-11-10 2:52 UTC (permalink / raw)
To: trix, linux-kernel, clang-built-linux, cocci
Cc: alsa-devel, linux-aspeed, linux-iio, dri-devel, linux-stm32,
linux-rtc, linux-samsung-soc, linux-scsi, linux-rdma, qat-linux,
amd-gfx, linux-pm, linux-mediatek, linux-rpi-kernel, linux-tegra,
linux-amlogic, linux-nfs, netdev, linux-mmc, tipc-discussion,
linux-crypto, linux-btrfs
On Tue, 2020-10-27 at 09:42 -0700, trix@redhat.com wrote:
> This rfc will describe
> An upcoming treewide cleanup.
> How clang tooling was used to programatically do the clean up.
> Solicit opinions on how to generally use clang tooling.
>
> The clang warning -Wextra-semi-stmt produces about 10k warnings.
> Reviewing these, a subset of semicolon after a switch looks safe to
> fix all the time. An example problem
>
> void foo(int a) {
> switch(a) {
> case 1:
> ...
> }; <--- extra semicolon
> }
>
> Treewide, there are about 100 problems in 50 files for x86_64 allyesconfig.
> These fixes will be the upcoming cleanup.
coccinelle already does some of these.
For instance: scripts/coccinelle/misc/semicolon.cocci
Perhaps some tool coordination can be done here as
coccinelle/checkpatch/clang/Lindent call all be used
to do some facet or another of these cleanup issues.
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Cocci] Subject: [RFC] clang tooling cleanups
2020-11-10 2:52 ` [Cocci] Subject: [RFC] clang tooling cleanups Joe Perches
@ 2020-11-10 13:12 ` Tom Rix
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rix @ 2020-11-10 13:12 UTC (permalink / raw)
To: Joe Perches, linux-kernel, clang-built-linux, cocci
Cc: alsa-devel, linux-aspeed, linux-iio, dri-devel, linux-stm32,
linux-rtc, linux-samsung-soc, linux-scsi, linux-rdma, qat-linux,
amd-gfx, linux-pm, linux-mediatek, linux-rpi-kernel, linux-tegra,
linux-amlogic, linux-nfs, netdev, linux-mmc, tipc-discussion,
linux-crypto, linux-btrfs
On 11/9/20 6:52 PM, Joe Perches wrote:
> On Tue, 2020-10-27 at 09:42 -0700, trix@redhat.com wrote:
>> This rfc will describe
>> An upcoming treewide cleanup.
>> How clang tooling was used to programatically do the clean up.
>> Solicit opinions on how to generally use clang tooling.
>>
>> The clang warning -Wextra-semi-stmt produces about 10k warnings.
>> Reviewing these, a subset of semicolon after a switch looks safe to
>> fix all the time. An example problem
>>
>> void foo(int a) {
>> switch(a) {
>> case 1:
>> ...
>> }; <--- extra semicolon
>> }
>>
>> Treewide, there are about 100 problems in 50 files for x86_64 allyesconfig.
>> These fixes will be the upcoming cleanup.
> coccinelle already does some of these.
>
> For instance: scripts/coccinelle/misc/semicolon.cocci
>
> Perhaps some tool coordination can be done here as
> coccinelle/checkpatch/clang/Lindent call all be used
> to do some facet or another of these cleanup issues.
Thanks for pointing this out.
I will take a look at it.
Tom
>
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-10 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201027164255.1573301-1-trix@redhat.com>
2020-11-10 2:52 ` [Cocci] Subject: [RFC] clang tooling cleanups Joe Perches
2020-11-10 13:12 ` Tom Rix
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 NNTP newsgroup(s).