From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 162CBC55ABD for ; Tue, 10 Nov 2020 02:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8DF2207D3 for ; Tue, 10 Nov 2020 02:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729897AbgKJCwT (ORCPT ); Mon, 9 Nov 2020 21:52:19 -0500 Received: from smtprelay0242.hostedemail.com ([216.40.44.242]:52914 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727311AbgKJCwS (ORCPT ); Mon, 9 Nov 2020 21:52:18 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id F008012CB; Tue, 10 Nov 2020 02:52:13 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: ink22_1714ef1272f1 X-Filterd-Recvd-Size: 2439 Received: from [192.168.0.160] (cpe-72-134-80-165.natsow.res.rr.com [72.134.80.165]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Tue, 10 Nov 2020 02:52:09 +0000 (UTC) Message-ID: <3c39c363690d0b46069afddc3ad09213011e5cd4.camel@perches.com> Subject: Re: Subject: [RFC] clang tooling cleanups From: Joe Perches To: trix@redhat.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, cocci Cc: linux-pm@vger.kernel.org, linux-crypto@vger.kernel.org, qat-linux@intel.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-iio@vger.kernel.org, linux-rdma@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-rtc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net, alsa-devel@alsa-project.org, linux-rpi-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Date: Mon, 09 Nov 2020 18:52:08 -0800 In-Reply-To: <20201027164255.1573301-1-trix@redhat.com> References: <20201027164255.1573301-1-trix@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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.