From: "Jan Beulich" Subject: [PATCH] linux: prevent warnings on unhandled enumeration values Date: Wed, 05 Mar 2008 16:10:22 +0000 Message-ID: <47CED3FE.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org XenbusStateReconfiguring/XenbusStateReconfigured were introduced by c/s 437, but aren't handled in many switch statements. This c/s also introduced a possibly un-referenced label, which also gets eliminated here. As usual, written and tested on 2.6.25-rc3 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2008-02-26/drivers/char/tpm/tpm_xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/char/tpm/tpm_xen.c 2008-02-26 = 17:46:36.000000000 +0100 +++ head-2008-02-26/drivers/char/tpm/tpm_xen.c 2008-03-05 12:34:15.0000000= 00 +0100 @@ -346,6 +346,8 @@ static void backend_changed(struct xenbu case XenbusStateInitialising: case XenbusStateInitWait: case XenbusStateInitialised: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: break; =20 Index: head-2008-02-26/drivers/xen/blkfront/blkfront.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/xen/blkfront/blkfront.c 2008-03-05 = 12:33:07.000000000 +0100 +++ head-2008-02-26/drivers/xen/blkfront/blkfront.c 2008-03-04 = 15:13:17.000000000 +0100 @@ -266,6 +266,8 @@ static void backend_changed(struct xenbu case XenbusStateInitialising: case XenbusStateInitWait: case XenbusStateInitialised: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: case XenbusStateClosed: break; Index: head-2008-02-26/drivers/xen/fbfront/xenfb.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/xen/fbfront/xenfb.c 2008-03-05 = 12:33:07.000000000 +0100 +++ head-2008-02-26/drivers/xen/fbfront/xenfb.c 2008-03-04 15:47:06.0000000= 00 +0100 @@ -687,6 +687,8 @@ static void xenfb_backend_changed(struct switch (backend_state) { case XenbusStateInitialising: case XenbusStateInitialised: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: case XenbusStateClosed: break; Index: head-2008-02-26/drivers/xen/fbfront/xenkbd.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/xen/fbfront/xenkbd.c 2008-03-05 = 12:33:07.000000000 +0100 +++ head-2008-02-26/drivers/xen/fbfront/xenkbd.c 2008-03-04 = 15:47:19.000000000 +0100 @@ -268,6 +268,8 @@ static void xenkbd_backend_changed(struc switch (backend_state) { case XenbusStateInitialising: case XenbusStateInitialised: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: case XenbusStateClosed: break; Index: head-2008-02-26/drivers/xen/netfront/netfront.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/xen/netfront/netfront.c 2008-03-05 = 12:33:07.000000000 +0100 +++ head-2008-02-26/drivers/xen/netfront/netfront.c 2008-03-04 = 15:48:01.000000000 +0100 @@ -537,6 +537,8 @@ static void backend_changed(struct xenbu case XenbusStateInitialising: case XenbusStateInitialised: case XenbusStateConnected: + case XenbusStateReconfiguring: + case XenbusStateReconfigured: case XenbusStateUnknown: case XenbusStateClosed: break; Index: head-2008-02-26/drivers/xen/pcifront/pci_op.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-02-26.orig/drivers/xen/pcifront/pci_op.c 2008-03-05 = 12:33:07.000000000 +0100 +++ head-2008-02-26/drivers/xen/pcifront/pci_op.c 2008-03-04 = 15:46:05.000000000 +0100 @@ -359,7 +359,6 @@ int pcifront_rescan_root(struct pcifront struct pci_bus *b; struct pci_dev *d; unsigned int devfn; - int err =3D 0; =20 #ifndef CONFIG_PCI_DOMAINS if (domain !=3D 0) { @@ -367,8 +366,7 @@ int pcifront_rescan_root(struct pcifront "PCI Root in non-zero PCI Domain! domain=3D%d\n", = domain); dev_err(&pdev->xdev->dev, "Please compile with CONFIG_PCI_DOMAINS\n"); - err =3D -EINVAL; - goto err_out; + return -EINVAL; } #endif =20 @@ -407,8 +405,7 @@ int pcifront_rescan_root(struct pcifront } } =20 - err_out: - return err; + return 0; } =20 static void free_root_bus_devs(struct pci_bus *bus)