Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2022207ima; Mon, 22 Oct 2018 02:52:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV62nUqSlzC6x3ufiuV+CkmXefobydBBWka1PiOacsP1KZkEJWjpn6ufRagUWnWbDDwuwlzDt X-Received: by 2002:a63:5308:: with SMTP id h8-v6mr41097497pgb.358.1540201970258; Mon, 22 Oct 2018 02:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540201970; cv=none; d=google.com; s=arc-20160816; b=yFwu/H2wBUU5XoDzTUj6/AKVPrwK2aq5Zd4AtKELpxxR85vj5keeUusRTJAeHlxrmr Gb+dd5Ofip9P7kX24KUTGzyEEAhjM4AIDdOakxr9Usg89EF2Mk+J/OK8l5NRLtPG2EHk Kr8I6onlxjBM+9Xh5p+KxizbfJIlxgUXBhU3g7Fw8iuz2LNpafGNZBG4rfmnEX0ZqkWd /ZFTwtLRs0n5qi7zUhNStMs09mTTjEwmPd1zF+mABsM/ifUNw9cCZIx4jKlWswvuR+zT hSKSWKv6OTwo7ilLFlUHF/SdSGUTDE9Jglfsvv8XXM4iw43nzUGWpBswA+ta0lHgVIhv xI/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ozISLo3xAi9TSU5L7p7SKN5+d47Xsy+1ctEHN8dJBWk=; b=KK4bKqXxB/WZWBBit7xm/6H+d3RcKrnuOUCCpnfU3bxrSdveq6GNOe7RXbe13ilm8j 6z7iWD2eek542FRSqFzCA3Jejb4D/fOO0r2AUdmd02rPkjyspj46+YFBGbhxi8zy1xMw ent2H+2YnxW9zKcFIYLtouoYcs38axv+/DxMSYpD48cFsBW2RjoB9Jc3Ua5iKjzsJqUa Q+oje3YlgLTZob9tF2LfhJnIgMBaEfBxTan4eZ7cAhsb1lyBQAGkWLu4KtLK9+p1YIdv nvqvdf8x4mbvb+9D/ZyjA2OSrn56O/6YARlcVBWlntbqabyPfh7D+m6ZIMlLN8aNOch7 tOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fHvLiAKw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65-v6si33662022pfd.39.2018.10.22.02.52.35; Mon, 22 Oct 2018 02:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fHvLiAKw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728529AbeJVSKC (ORCPT + 99 others); Mon, 22 Oct 2018 14:10:02 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41331 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbeJVSKB (ORCPT ); Mon, 22 Oct 2018 14:10:01 -0400 Received: by mail-lj1-f193.google.com with SMTP id u21-v6so36334494lja.8; Mon, 22 Oct 2018 02:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ozISLo3xAi9TSU5L7p7SKN5+d47Xsy+1ctEHN8dJBWk=; b=fHvLiAKway712yQlSAlR/phPbI0sBqLJ1r5NThC+Snj91UrsM/uuzcbSkL0O6xoxNu SNc1rAwajjmjWPCU3mToGljfwOzCYNgoD1tPkg7F7Kv9aLHbw671AGLO5ozfChqpfTcH 3LEhWVHGw2crLAVcBFYAuI58v/VrpL9xxPTA4qRMYMfpqI/aS06L+kU1EXqQxMxb7DQb RHkLFIO7mc6Sdf4iYSwkaD5EdridUsOY1dRi7tk7l7D/Wffn8ZSz71bwPBbsxz6ICpxE s99ofowUWeHxP2EPdsq3lDPtkhPhUIL+6CFpt/4KYBhDQS4kxn0lATpdJa/uul1HO/5I sZ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ozISLo3xAi9TSU5L7p7SKN5+d47Xsy+1ctEHN8dJBWk=; b=EI6saGjdvhrP7haEhUeGkCsVDSer7vKKcgC2oUEfGMbIjG1xSWgDC2MGjg070IRizr xbahJ1n3KLLoCq4ujr9D/FuGAiobwNhgPhDYNronZnRvNTzShr5qsJ3aivQ7YehFfSNW athFDpiFS16V841clJ9x2eb8bJZ/Bgvt5edQVAA8259dzOZEwBZlZ3vKsoxnNHWyUxAp s5HCEgJjtrcXz2lt5ORAWsfzY0i1VpFZJjsBv/HnKKw6ZIhxkiBjtvFR7rVplE9pRyAe r11GanQTa2xMtTGpFA9upuS5KQAzA3UR86wWjjAPbtnebFZq2mAQB2dG+/srjMzK7zKq 6IyQ== X-Gm-Message-State: ABuFfojsBRdDUp7S2egx+fvNsSdXtT52Qk3cNCkAx/pQpTjQIlAVduR4 r8SwAhaAyJKzTHT0ZVawbNPtlgIJWvJVPnyLwrA= X-Received: by 2002:a2e:240b:: with SMTP id k11-v6mr7325701ljk.139.1540201930509; Mon, 22 Oct 2018 02:52:10 -0700 (PDT) MIME-Version: 1.0 References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> In-Reply-To: From: Miguel Ojeda Date: Mon, 22 Oct 2018 11:51:59 +0200 Message-ID: Subject: Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough To: Joe Perches Cc: Greg KH , linux-kernel , Dan , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , David Miller , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , "Ted Ts'o" , Geert Uytterhoeven , Rasmus Villemoes , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Nick Desaulniers , Andrew Morton , Linus Torvalds , Linux Doc Mailing List , Ext4 Developers List , linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 21, 2018 at 8:11 PM Joe Perches wrote: > > On Sun, 2018-10-21 at 19:14 +0200, Miguel Ojeda wrote: > > Let gcc know these cases are meant to fall through to the next label > > by annotating them with the new __fallthrough statement attribute; > > and remove the comment since it conveys the same information > > (which was also parsed by gcc to suppress the warning). > > Instead of many individual conversion patches, > perhaps a script to do all the conversions at once. Note that this was only an example of the attribute (some people asked for an example when introducing another one, so I preemptively did it for this one). Doing the conversion (and how :-) I left it for afterwards, if people agree with the attribute. > > Maybe: > > pattern='(?:\/\*\s*fall(?:\s*|\s*\-\s*)thr(?:u|ough)\s*\*\/|\/\/\s*fall\s*thr(?:u|ough)\s*$)' > git grep -P -i --name-only "$pattern" -- '*.[ch]' | > xargs perl -p -i -e "s/$pattern/__fallthrough;/gi" By the way, I checked first if coccinelle could match input comments, but it doesn't, according to Julia. I am also thinking whether a compiler plugin could easily do this, but I don't have my hopes high given these are comments... Also, regardless of how it is done, the patches need to be sent individually to maintainers, no? I have a vague memory that big & automated conversions were a bit frozen upon in the kernel. Greg...? Cheers, Miguel