All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Gustavo A.R.Silva" <gustavo@embeddedor.com>
Cc: <keescook@chromium.org>, "Bjorn Helgaas" <bhelgaas@google.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"xen-devel" <xen-devel@lists.xenproject.org>,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Juergen Gross" <jgross@suse.com>, <linux-kernel@vger.kernel.org>,
	<linux-pci@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs
Date: Mon, 25 Mar 2019 07:25:09 -0600	[thread overview]
Message-ID: <5C98D6B502000078002219FB@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20190320182715.GA9406@embeddedor>

>>> On 20.03.19 at 19:27, <gustavo@embeddedor.com> wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warnings:
> 
> drivers/pci/proc.c: In function ‘proc_bus_pci_ioctl’:
> drivers/pci/proc.c:216:6: warning: this statement may fall through 
> [-Wimplicit-fallthrough=]
>    if (arch_can_pci_mmap_wc()) {
>       ^
> drivers/pci/proc.c:225:2: note: here
>   default:
>   ^~~~~~~
> 
> drivers/pci/xen-pcifront.c: In function ‘pcifront_backend_changed’:
> drivers/pci/xen-pcifront.c:1105:6: warning: this statement may fall through 
> [-Wimplicit-fallthrough=]
>    if (xdev->state == XenbusStateClosed)
>       ^
> drivers/pci/xen-pcifront.c:1108:2: note: here
>   case XenbusStateClosing:
>   ^~~~
> 
> Notice that, in this particular case, the /* fall through */
> comment is placed at the very bottom of the case statement,
> which is what GCC is expecting to find.
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.

None of the above explains why ...

> --- a/drivers/pci/xen-pcifront.c
> +++ b/drivers/pci/xen-pcifront.c
> @@ -1104,7 +1104,7 @@ static void __ref pcifront_backend_changed(struct xenbus_device *xdev,
>  	case XenbusStateClosed:
>  		if (xdev->state == XenbusStateClosed)
>  			break;
> -		/* Missed the backend's CLOSING state -- fallthrough */
> +		/* fall through - Missed the backend's CLOSING state. */

... the original comment here wasn't good enough.

Jan


      parent reply	other threads:[~2019-03-25 13:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 18:27 [PATCH] PCI: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-03-20 19:24 ` Bjorn Helgaas
2019-03-20 19:33   ` Gustavo A. R. Silva
2019-03-20 19:33   ` Gustavo A. R. Silva
2019-03-20 19:24 ` Bjorn Helgaas
2019-03-20 19:27 ` Andrew Cooper
2019-03-20 19:27 ` [Xen-devel] " Andrew Cooper
2019-03-20 19:41   ` Gustavo A. R. Silva
2019-03-20 19:41   ` [Xen-devel] " Gustavo A. R. Silva
2019-03-20 20:13 ` Bjorn Helgaas
2019-03-20 20:23   ` Gustavo A. R. Silva
2019-03-20 20:23   ` Gustavo A. R. Silva
2019-03-20 20:13 ` Bjorn Helgaas
2019-03-25 13:25 ` Jan Beulich
2019-03-25 13:25 ` Jan Beulich [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=5C98D6B502000078002219FB@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=gustavo@embeddedor.com \
    --cc=jgross@suse.com \
    --cc=keescook@chromium.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.