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=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 7D11DC56202 for ; Tue, 10 Nov 2020 13:12:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1AAE92068D for ; Tue, 10 Nov 2020 13:12:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Di+p8tHp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730391AbgKJNMk (ORCPT ); Tue, 10 Nov 2020 08:12:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42671 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730542AbgKJNMd (ORCPT ); Tue, 10 Nov 2020 08:12:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605013952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2V11rFQ3FKVTN+koXAVvig/bkOvKVZoOl9jWSSiZ8Ik=; b=Di+p8tHpuaV5rtMlatp24D6j8+WKmCUBtqz8yv0zCEdrS6sGXtBKp/ajiNQKnRgk1iVbBf EPgPhQ0oDcmNLweqKLA2uf1G287zKEdUoDcJ+SAJtNZ7ElvnOQlZ77m+OxtwtGg6hoPAvK H8JUZjK8UjW7EnlIU91t9XZBpHRi/X8= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-UfckxnPnOryM1wJrXAABnA-1; Tue, 10 Nov 2020 08:12:31 -0500 X-MC-Unique: UfckxnPnOryM1wJrXAABnA-1 Received: by mail-qv1-f71.google.com with SMTP id w6so2797265qvr.15 for ; Tue, 10 Nov 2020 05:12:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=2V11rFQ3FKVTN+koXAVvig/bkOvKVZoOl9jWSSiZ8Ik=; b=VMRbBIRbPpJgNbdK9woPsD/HRvaU5ujC1oLYSryeko3733xOgru3Bvsh7oCyrhzCOo T+vgHZGfXN3g7B+bgyyxa8EeAeCPMvCnmcvqt2WfcJ06fnhk5CbJRfg2vpcQK7iwwayF u1IkNYzMFQY6VkP2mF6SauBV/5Az5CLdk2XyEopexkpXufHPNvlb7xywu8UriABT3wz8 pDX+u3QNe0YbbKPn1H4jN2X+raTuXA007win6/OA8LkbePlkSWdNCmbweByzPXQMMa6q SpbJTgx2h+Mse/6T1+j+BPd2ncpSAp67hM9oSnoNnEp9F8abr/v1zxQkRuKqlzyei/uA X8HA== X-Gm-Message-State: AOAM532pO2JGP2AFVJRvG1Mu1rZ8TXyo7iwQDCz2UDZXoUoXQo0DKQT6 Y1RY+2bo3NuGLziN2XT3w1GYMqynKyMNWC8OY3AI4CFgonbMmm8Mlnk3matQMkDpwydizLkvRA3 gbM7c7q6lKCw57sWf X-Received: by 2002:ac8:3621:: with SMTP id m30mr8787095qtb.168.1605013950431; Tue, 10 Nov 2020 05:12:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRnI1rUF5eW2rST1vImtIogpOlMRBum2fO0dVCe+zUlRqVIaRBqmVo31rjlhOk2kmW2Hr8dQ== X-Received: by 2002:ac8:3621:: with SMTP id m30mr8787064qtb.168.1605013950178; Tue, 10 Nov 2020 05:12:30 -0800 (PST) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id e8sm7658678qti.28.2020.11.10.05.12.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Nov 2020 05:12:29 -0800 (PST) Subject: Re: Subject: [RFC] clang tooling cleanups To: Joe Perches , 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 References: <20201027164255.1573301-1-trix@redhat.com> <3c39c363690d0b46069afddc3ad09213011e5cd4.camel@perches.com> From: Tom Rix Message-ID: Date: Tue, 10 Nov 2020 05:12:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <3c39c363690d0b46069afddc3ad09213011e5cd4.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 > >