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=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=unavailable 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 43524C4708C for ; Fri, 28 May 2021 20:09:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E1A4613E3 for ; Fri, 28 May 2021 20:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbhE1UKh (ORCPT ); Fri, 28 May 2021 16:10:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbhE1UKf (ORCPT ); Fri, 28 May 2021 16:10:35 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D63D613B5; Fri, 28 May 2021 20:08:59 +0000 (UTC) Date: Fri, 28 May 2021 16:08:58 -0400 From: Steven Rostedt To: "Gustavo A. R. Silva" Cc: Ingo Molnar , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] ring-buffer: Fix fall-through warning for Clang Message-ID: <20210528160858.287e33ac@gandalf.local.home> In-Reply-To: <20210528195942.GA39174@embeddedor> References: <20210528195942.GA39174@embeddedor> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 May 2021 14:59:42 -0500 "Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix > a fall-through warning by replacing a /* fall through */ comment > with the new pseudo-keyword macro fallthrough; > > Notice that Clang doesn't recognize /* fall through */ comments as > implicit fall-through markings, so in order to globally enable > -Wimplicit-fallthrough for Clang, these comments need to be > replaced with fallthrough; in the whole codebase. > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by: Gustavo A. R. Silva > --- > JFYI: We had thousands of these sorts of warnings and now we are down > to just 25 in linux-next. This is one of those last remaining > warnings. And I have it fixed locally already. https://lore.kernel.org/lkml/20210511140246.18868-1-jj251510319013@gmail.com/ I've just been on vacation and haven't pushed it to next yet. It's still in the "to be tested" queue. -- Steve > > kernel/trace/ring_buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c > index 2c0ee6484990..d1463eac11a3 100644 > --- a/kernel/trace/ring_buffer.c > +++ b/kernel/trace/ring_buffer.c > @@ -3391,7 +3391,7 @@ static void check_buffer(struct ring_buffer_per_cpu *cpu_buffer, > case RINGBUF_TYPE_PADDING: > if (event->time_delta == 1) > break; > - /* fall through */ > + fallthrough; > case RINGBUF_TYPE_DATA: > ts += event->time_delta; > break;