ia64/linux-2.6.18-xen.hg

changeset 470:5baef0e18e36

xenbus: prevent warnings on unhandled enumeration values

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.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 05 17:28:41 2008 +0000 (2008-03-05)
parents 2da185c11693
children ba72914de93a
files drivers/char/tpm/tpm_xen.c drivers/xen/blkfront/blkfront.c drivers/xen/fbfront/xenfb.c drivers/xen/fbfront/xenkbd.c drivers/xen/netfront/netfront.c drivers/xen/pcifront/pci_op.c
line diff
     1.1 --- a/drivers/char/tpm/tpm_xen.c	Wed Mar 05 17:28:04 2008 +0000
     1.2 +++ b/drivers/char/tpm/tpm_xen.c	Wed Mar 05 17:28:41 2008 +0000
     1.3 @@ -347,6 +347,8 @@ static void backend_changed(struct xenbu
     1.4  	case XenbusStateInitialising:
     1.5  	case XenbusStateInitWait:
     1.6  	case XenbusStateInitialised:
     1.7 +	case XenbusStateReconfiguring:
     1.8 +	case XenbusStateReconfigured:
     1.9  	case XenbusStateUnknown:
    1.10  		break;
    1.11  
     2.1 --- a/drivers/xen/blkfront/blkfront.c	Wed Mar 05 17:28:04 2008 +0000
     2.2 +++ b/drivers/xen/blkfront/blkfront.c	Wed Mar 05 17:28:41 2008 +0000
     2.3 @@ -266,6 +266,8 @@ static void backend_changed(struct xenbu
     2.4  	case XenbusStateInitialising:
     2.5  	case XenbusStateInitWait:
     2.6  	case XenbusStateInitialised:
     2.7 +	case XenbusStateReconfiguring:
     2.8 +	case XenbusStateReconfigured:
     2.9  	case XenbusStateUnknown:
    2.10  	case XenbusStateClosed:
    2.11  		break;
     3.1 --- a/drivers/xen/fbfront/xenfb.c	Wed Mar 05 17:28:04 2008 +0000
     3.2 +++ b/drivers/xen/fbfront/xenfb.c	Wed Mar 05 17:28:41 2008 +0000
     3.3 @@ -687,6 +687,8 @@ static void xenfb_backend_changed(struct
     3.4  	switch (backend_state) {
     3.5  	case XenbusStateInitialising:
     3.6  	case XenbusStateInitialised:
     3.7 +	case XenbusStateReconfiguring:
     3.8 +	case XenbusStateReconfigured:
     3.9  	case XenbusStateUnknown:
    3.10  	case XenbusStateClosed:
    3.11  		break;
     4.1 --- a/drivers/xen/fbfront/xenkbd.c	Wed Mar 05 17:28:04 2008 +0000
     4.2 +++ b/drivers/xen/fbfront/xenkbd.c	Wed Mar 05 17:28:41 2008 +0000
     4.3 @@ -268,6 +268,8 @@ static void xenkbd_backend_changed(struc
     4.4  	switch (backend_state) {
     4.5  	case XenbusStateInitialising:
     4.6  	case XenbusStateInitialised:
     4.7 +	case XenbusStateReconfiguring:
     4.8 +	case XenbusStateReconfigured:
     4.9  	case XenbusStateUnknown:
    4.10  	case XenbusStateClosed:
    4.11  		break;
     5.1 --- a/drivers/xen/netfront/netfront.c	Wed Mar 05 17:28:04 2008 +0000
     5.2 +++ b/drivers/xen/netfront/netfront.c	Wed Mar 05 17:28:41 2008 +0000
     5.3 @@ -536,6 +536,8 @@ static void backend_changed(struct xenbu
     5.4  	case XenbusStateInitialising:
     5.5  	case XenbusStateInitialised:
     5.6  	case XenbusStateConnected:
     5.7 +	case XenbusStateReconfiguring:
     5.8 +	case XenbusStateReconfigured:
     5.9  	case XenbusStateUnknown:
    5.10  	case XenbusStateClosed:
    5.11  		break;
     6.1 --- a/drivers/xen/pcifront/pci_op.c	Wed Mar 05 17:28:04 2008 +0000
     6.2 +++ b/drivers/xen/pcifront/pci_op.c	Wed Mar 05 17:28:41 2008 +0000
     6.3 @@ -359,7 +359,6 @@ int pcifront_rescan_root(struct pcifront
     6.4  	struct pci_bus *b;
     6.5  	struct pci_dev *d;
     6.6  	unsigned int devfn;
     6.7 -	int err = 0;
     6.8  
     6.9  #ifndef CONFIG_PCI_DOMAINS
    6.10  	if (domain != 0) {
    6.11 @@ -367,8 +366,7 @@ int pcifront_rescan_root(struct pcifront
    6.12  			"PCI Root in non-zero PCI Domain! domain=%d\n", domain);
    6.13  		dev_err(&pdev->xdev->dev,
    6.14  			"Please compile with CONFIG_PCI_DOMAINS\n");
    6.15 -		err = -EINVAL;
    6.16 -		goto err_out;
    6.17 +		return -EINVAL;
    6.18  	}
    6.19  #endif
    6.20  
    6.21 @@ -401,8 +399,7 @@ int pcifront_rescan_root(struct pcifront
    6.22  		}
    6.23  	}
    6.24  
    6.25 -      err_out:
    6.26 -	return err;
    6.27 +	return 0;
    6.28  }
    6.29  
    6.30  static void free_root_bus_devs(struct pci_bus *bus)