Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2291914ima; Mon, 22 Oct 2018 07:29:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV61qDF9R5BO6aOwVP5mkMLGxGgnzhreNBn3pT6aLGwh7BCCDMIyF7TmIPAneBIL1+O1DxLTN X-Received: by 2002:a62:401:: with SMTP id 1-v6mr45627081pfe.236.1540218543091; Mon, 22 Oct 2018 07:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540218543; cv=none; d=google.com; s=arc-20160816; b=0WTWVmmqcBIijt5gBUFnpUKI5rahcZ9FDSWjgA2038qFXO1JJZs/JhtJF7ixOYftx1 iIMvLMUMrDna6OakOHLeVIJ3X9CqJpwL5JSUmNInW1ODggScmcvRupNuBwQ74XoJ6GFt g9wJHUbrYu0EQ6ycSPilnIJhntRCrVWpBlwJ0XDrP0UIxEMdgeY0K7qiqOqML7q6U791 udEjQJIOCZOr0suuCDJ+H6i0qSdxwoMyJEnx4rP/LDgirTUHCEAlQouF7fIqarBVa2My 5MK1fChc0ShxwYdOr4gSYPbIDj1oQpfSFD//OQSKNAgEC5s3nYLhBsE0D+/XgvtxXAs5 0siA== 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 :references:in-reply-to:mime-version:dkim-signature; bh=rMjiCR2LQUA6DC1gYbbouQ4QtRy0545yzfC08/V1Ckk=; b=fTUO3T3YOCb1jNXWzSlBK7Y9zKBpF7QtsAlZxDs+qUOPbvmnC7yPdxWbeGaDdX2Vbs K6TQP7+Hmd4HpxklmVPeZGuVLD8Bmxo0913Y/4u4O4P0fLlZCbA7yDAnJXrH/FdvNoby 0XSAUmfgwZqaygb59L6Z707JRoeJqRqdsrofPafIVfJBc0pWn1lNIh4p0QOlN+D7dLVw Tl/vFL0NgHaQCXJxWOye1cJcxjMtVyKSW07PBNP/+NzxEf3XAFJGf/6pI1oRhAK/nRw2 pU4q2D2lPsb+lEfkcsFli5bFwaD0gmHuGIAtgyx0gWujxZkroj3gXOwQeXZiHQUUIL9t QdOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PkvlheYt; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5-v6si32419880pgq.413.2018.10.22.07.28.46; Mon, 22 Oct 2018 07:29:03 -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=@chromium.org header.s=google header.b=PkvlheYt; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728435AbeJVW2w (ORCPT + 99 others); Mon, 22 Oct 2018 18:28:52 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:40974 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727210AbeJVW2w (ORCPT ); Mon, 22 Oct 2018 18:28:52 -0400 Received: by mail-yb1-f193.google.com with SMTP id e16-v6so16205220ybk.8 for ; Mon, 22 Oct 2018 07:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rMjiCR2LQUA6DC1gYbbouQ4QtRy0545yzfC08/V1Ckk=; b=PkvlheYtk9WK9dMUL5wyOotYB3lJIhQ7VTqthtSDMMzKPykf2U9mNv7oIougm60cZT jxhcVBuDPinHXotRzH8cgzLpFX8ClfClRYmrtsD0FtyOGjWpEgeI1pC5qF33Me4J2vuO n1Khg7j/74hMgGmcS+VZnm5aPckOrskHsbsb4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rMjiCR2LQUA6DC1gYbbouQ4QtRy0545yzfC08/V1Ckk=; b=Bsv0DG76hdsT4Z0wzbaQO0IqQeonHGyWcZFQWgo5rkgMTYPSTjOjalAwIDIg9p6Vtd x96mPOwwATES4aY3UpWh03g27Y4zFGwxzWDrFVJSzMoevTUs3Myuj6BHVdHd/3Fed7gF RGv60eVAPNWASDTx6j6jgfDA7NVk+hPw8z4FE2RUt+05OlmJnoIVe3UyjW/n7cHgCqVI zGy/rgvKBOGwgTio+/qrSFkHLkPmfDY0b9Eap9oIR4wvR2fPdlfOUWyNPKT/RcSKZu20 7C6rZM++JItxkmyNMagFQQRqEuNHxHw25wKPjguem0I7sBLoN6XwmGszCnyy+T81k7ff 6JEg== X-Gm-Message-State: ABuFfoik3GBpiOue//bawDklb+LWZViFI4pLiKbhswKZ0NV2RpSWZ1U7 ryRWhxTKoVGNIMNyKFMngtBzbgF0ttw= X-Received: by 2002:a25:6ad6:: with SMTP id f205-v6mr31097064ybc.278.1540217405992; Mon, 22 Oct 2018 07:10:05 -0700 (PDT) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com. [209.85.219.169]) by smtp.gmail.com with ESMTPSA id e206-v6sm341342ywc.8.2018.10.22.07.10.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 07:10:04 -0700 (PDT) Received: by mail-yb1-f169.google.com with SMTP id n140-v6so1349393yba.1 for ; Mon, 22 Oct 2018 07:10:03 -0700 (PDT) X-Received: by 2002:a25:8091:: with SMTP id n17-v6mr32679974ybk.209.1540217403211; Mon, 22 Oct 2018 07:10:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3990:0:0:0:0:0 with HTTP; Mon, 22 Oct 2018 07:10:02 -0700 (PDT) In-Reply-To: <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-3-miguel.ojeda.sandonis@gmail.com> From: Kees Cook Date: Mon, 22 Oct 2018 07:10:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] Compiler Attributes: auxdisplay: panel: use __fallthrough To: Miguel Ojeda , "Gustavo A. R. Silva" Cc: Greg Kroah-Hartman , LKML , Dan Carpenter , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , "David S . Miller" , Andrey Ryabinin , 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 , "Theodore Ts'o" , Geert Uytterhoeven , Rasmus Villemoes , Joe Perches , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Nick Desaulniers , Andrew Morton , Linus Torvalds , "open list:DOCUMENTATION" , Ext4 Developers List , Sparse Mailing-list , linux-kbuild 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 10:14 AM, 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). > > Signed-off-by: Miguel Ojeda > --- > drivers/auxdisplay/panel.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c > index 21b9b2f2470a..0755034e49ba 100644 > --- a/drivers/auxdisplay/panel.c > +++ b/drivers/auxdisplay/panel.c > @@ -1367,7 +1367,7 @@ static void panel_process_inputs(void) > break; > input->rise_timer = 0; > input->state = INPUT_ST_RISING; > - /* fall through */ > + __fallthrough; > case INPUT_ST_RISING: > if ((phys_curr & input->mask) != input->value) { > input->state = INPUT_ST_LOW; > @@ -1380,11 +1380,11 @@ static void panel_process_inputs(void) > } > input->high_timer = 0; > input->state = INPUT_ST_HIGH; > - /* fall through */ > + __fallthrough; > case INPUT_ST_HIGH: > if (input_state_high(input)) > break; > - /* fall through */ > + __fallthrough; > case INPUT_ST_FALLING: > input_state_falling(input); > } > -- > 2.17.1 > I would prefer we continue to use the comment style until we've got confirmed support for (at least) Clang, Coverity, CPPcheck, smatch, and eclipse. -Kees -- Kees Cook Pixel Security