Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp279697pxa; Fri, 21 Aug 2020 07:08:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw23FOnox9CiNZpiZtqqFGUhnFKUWTQAh/OvvpMEGhhnxyfhA0MhheWrPqo+HhOD4TGeGgx X-Received: by 2002:a50:ee93:: with SMTP id f19mr2950571edr.31.1598018932593; Fri, 21 Aug 2020 07:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598018932; cv=none; d=google.com; s=arc-20160816; b=tP4VXVNgO16HpZsx6wjx7Fi3KP5tdh0I9wAaByt3k8kYqaExVyQuODu/1RuTip2Cm9 Z3AX/y8fVMkJjRDXL/jlA7FJ8SSzvYa3dYpGKSmupu3WnjwroTi+G40z6BkYaNERKNpz 2XooS/hZdphEB41BgVL/HMAhOBI8khwL201wpkHSQBv/S8oOTdLr0eMmIaAPuee1AGff IklEFmt3ffYs4xp1zfY7O+IxJ9ibjQ5s4GvOgs2KbfC1e8cCmOXZ4w4wHaXlgZX9FZdw 8Wi6hy194EogjBL12Y9jbHScTtFR9lsCkBMd5LEg4KbgUwV0L4VnU4/ew7a8UhJmW5kt x0eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xpKoa+cKTH4/KmvB1g8UYGRgWpYwztQzcxrQTfJsQ8s=; b=LrLLZss8BXVF4Wz4GeMyR8aiBpabzqJJ7ZcURpXNU5CKFkstTTJoI4PoNecEp6s57C g+mMjLgbqD//vwUgcUt+0F741Hq4N+qEVb4vIVv/ZhOdPF6OYGsLqHK+sMNm/88mtrB4 fpZ0WdLnwJaw/Y4TCij0NT2vl139K/yuXXquVi+Az/c95J06rPsLE9T0qGUbuFFiRW0+ qLZ+rSPc+FMsrED98EZEjxeXPKm7NJrd5yRvDqqGYD4AA2vOJeJ62PpWNT+n8DWT4nYv WsBUJizq6M4WX/zTp2MWAerDYz7mayTlfvd9YgfGfGp8DJAqMiSqtNUYj3fVOxs8dCjP +Tug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn2si1354284edb.378.2020.08.21.07.08.28; Fri, 21 Aug 2020 07:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727787AbgHUOHc (ORCPT + 99 others); Fri, 21 Aug 2020 10:07:32 -0400 Received: from elvis.franken.de ([193.175.24.41]:54781 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725897AbgHUOHa (ORCPT ); Fri, 21 Aug 2020 10:07:30 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1k97hX-00029F-00; Fri, 21 Aug 2020 16:07:27 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id D6277C0D89; Fri, 21 Aug 2020 16:07:03 +0200 (CEST) Date: Fri, 21 Aug 2020 16:07:03 +0200 From: Thomas Bogendoerfer To: "Gustavo A. R. Silva" Cc: He Zhe , rric@kernel.org, oprofile-list@lists.sf.net, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: Re: [PATCH] mips/oprofile: Fix fallthrough placement Message-ID: <20200821140703.GA13949@alpha.franken.de> References: <20200820125440.350184-1-zhe.he@windriver.com> <20200821074821.GD8336@alpha.franken.de> <5e86b824-4c92-3cfe-fc36-493425e85f2a@windriver.com> <99d6dd20-8fe7-8b65-3ff0-839f19fe6b00@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99d6dd20-8fe7-8b65-3ff0-839f19fe6b00@embeddedor.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 04:23:28AM -0500, Gustavo A. R. Silva wrote: > > > On 8/21/20 03:46, He Zhe wrote: > > > > > > On 8/21/20 3:48 PM, Thomas Bogendoerfer wrote: > >> On Thu, Aug 20, 2020 at 08:54:40PM +0800, zhe.he@windriver.com wrote: > >>> From: He Zhe > >>> > >>> We want neither > >>> " > >>> include/linux/compiler_attributes.h:201:41: warning: statement will never > >>> be executed [-Wswitch-unreachable] > >>> 201 | # define fallthrough __attribute__((__fallthrough__)) > >>> | ^~~~~~~~~~~~~ > >>> " > >>> nor > >>> " > >>> include/linux/compiler_attributes.h:201:41: warning: attribute > >>> 'fallthrough' not preceding a case label or default label > >>> 201 | # define fallthrough __attribute__((__fallthrough__)) > >>> | ^~~~~~~~~~~~~ > >>> " > >>> > >>> It's not worth adding one more macro. Let's simply place the fallthrough > >>> in between the expansions. > >>> > >>> Signed-off-by: He Zhe > >> there is already another patch for the problem, which I've applied > >> to mips-fixes. > > > > You mean the below one? > > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?h=mips-fixes&id=5900acb374fe2f4f42bbcb2c84db64f582d917a1 > > > > That patch handles the first warning in my commit log but does not handle the > > second one which is introduced since gcc v10.1.0 commit 6c80b1b56dec > > ("Make more bad uses of fallthrough attribute into pedwarns."). > > > > This is true. > > Thomas, please apply this patch instead of mine. Also, consider adding > the Fixes tag and CC stable due to the non-executable code error, and > my Reviewed-by: > > Fixes: c9b029903466 ("MIPS: Use fallthrough for arch/mips") > Cc: stable@vger.kernel.org > Reviewed-by: Gustavo A. R. Silva done. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]