All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: He Zhe <zhe.he@windriver.com>,
	rric@kernel.org, oprofile-list@lists.sf.net,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: Re: [PATCH] mips/oprofile: Fix fallthrough placement
Date: Fri, 21 Aug 2020 16:07:03 +0200	[thread overview]
Message-ID: <20200821140703.GA13949@alpha.franken.de> (raw)
In-Reply-To: <99d6dd20-8fe7-8b65-3ff0-839f19fe6b00@embeddedor.com>

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 <zhe.he@windriver.com>
> >>>
> >>> 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 <zhe.he@windriver.com>
> >> 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 <gustavoars@kernel.org>

done.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2020-08-21 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 12:54 [PATCH] mips/oprofile: Fix fallthrough placement zhe.he
2020-08-21  7:48 ` Thomas Bogendoerfer
2020-08-21  8:46   ` He Zhe
2020-08-21  9:23     ` Gustavo A. R. Silva
2020-08-21 14:07       ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200821140703.GA13949@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=rric@kernel.org \
    --cc=zhe.he@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.