Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3232972img; Mon, 25 Mar 2019 06:27:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRV88HcirvQAv8lQY4wkSxJ1UgAmtobcCnUYm9RmnTsGJE7cacMVFOOwtS5H7jSwfKRPeO X-Received: by 2002:a63:df12:: with SMTP id u18mr22875554pgg.135.1553520459457; Mon, 25 Mar 2019 06:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553520459; cv=none; d=google.com; s=arc-20160816; b=hzZoxnKYpRF5a52dOdBqiRCxt+9CQ9AD+gW6QjTneHl1z9NO5slnQ3A6s7Bl9dpyWA Tl6rBJQvFFxj9a2HzU0iB+YMLoKPitxxVeBizvUYB5eYKxJFEHdooAVAWePxF7yVPQ/L pS96n8fMd+Y7MzjCV43dmTVfetAfrZ9vgY8RIkES0XVAJY9Q5ZSVDEgeF4PV6K37Fhfw 5qpS98KvOnxL3b9HzxsjD+ZbCln0D/L+UHHD/oui6Gabsapo1AIM+PxoM1pqF8ckDItE zk4Gdcx15T3qh7b6dhUTw+GmbtyKyus3/uhbMfCt0LyMDuEOMQgJ6Yiflt0aFgdwU8VE 2A/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references :subject:cc:to:from:date:message-id; bh=QI/VntyNqFCkZRcJpdCaDn+vqQ+5PNlT/pvNpZERKnY=; b=OUkae2km4R98LfMTZzCPAxhz2dsiDtXRna0/l/CWn1mKENmVPUTMptUmIiBKqgzNv9 og0Io0PXNP0lvXfs/+KT+VvAAYMq5Fde7hdJqhUOGUNAkaKM5mFwRTN1hL1H3fCKzX1f annAmGAnb+8MNylJN71xRQoPoj3+jNPLnlmhCjCzvuA0iiRie0nJqyYz6BDtt9O2IuVV +KInWJdi8ybUoawuATuXUKSfHYEPlrgLlaU+dLsQ0MYNeg2w9ErUTuIIrAHZxiIz1P0b XOTDZJLgBvGt4WeT3DM0VK4Rhf3n5tluuzs6fmD79lw6hD69WLLDoo1CVtZanQci6V3C lFCw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9si5862187plo.98.2019.03.25.06.27.23; Mon, 25 Mar 2019 06:27:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728839AbfCYNZR (ORCPT + 99 others); Mon, 25 Mar 2019 09:25:17 -0400 Received: from prv1-mh.provo.novell.com ([137.65.248.33]:42427 "EHLO prv1-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfCYNZR (ORCPT ); Mon, 25 Mar 2019 09:25:17 -0400 Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Mon, 25 Mar 2019 07:25:15 -0600 Message-Id: <5C98D6B502000078002219FB@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.1.0 Date: Mon, 25 Mar 2019 07:25:09 -0600 From: "Jan Beulich" To: "Gustavo A.R.Silva" Cc: , "Bjorn Helgaas" , "Stefano Stabellini" , "xen-devel" , "Boris Ostrovsky" , "Konrad Rzeszutek Wilk" , "Juergen Gross" , , Subject: Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs References: <20190320182715.GA9406@embeddedor> In-Reply-To: <20190320182715.GA9406@embeddedor> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 20.03.19 at 19:27, 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