[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] xenbus: prevent warnings on unhandled enumeration values



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204738121 0
# Node ID 5baef0e18e36cd886d99181a15a79bf392ea0688
# Parent  2da185c116933d7db2b7d7c875da3be52b035604
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@xxxxxxxxxx>
---
 drivers/char/tpm/tpm_xen.c      |    2 ++
 drivers/xen/blkfront/blkfront.c |    2 ++
 drivers/xen/fbfront/xenfb.c     |    2 ++
 drivers/xen/fbfront/xenkbd.c    |    2 ++
 drivers/xen/netfront/netfront.c |    2 ++
 drivers/xen/pcifront/pci_op.c   |    7 ++-----
 6 files changed, 12 insertions(+), 5 deletions(-)

diff -r 2da185c11693 -r 5baef0e18e36 drivers/char/tpm/tpm_xen.c
--- a/drivers/char/tpm/tpm_xen.c        Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/char/tpm/tpm_xen.c        Wed Mar 05 17:28:41 2008 +0000
@@ -347,6 +347,8 @@ static void backend_changed(struct xenbu
        case XenbusStateInitialising:
        case XenbusStateInitWait:
        case XenbusStateInitialised:
+       case XenbusStateReconfiguring:
+       case XenbusStateReconfigured:
        case XenbusStateUnknown:
                break;
 
diff -r 2da185c11693 -r 5baef0e18e36 drivers/xen/blkfront/blkfront.c
--- a/drivers/xen/blkfront/blkfront.c   Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/xen/blkfront/blkfront.c   Wed Mar 05 17:28:41 2008 +0000
@@ -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;
diff -r 2da185c11693 -r 5baef0e18e36 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c       Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/xen/fbfront/xenfb.c       Wed Mar 05 17:28:41 2008 +0000
@@ -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;
diff -r 2da185c11693 -r 5baef0e18e36 drivers/xen/fbfront/xenkbd.c
--- a/drivers/xen/fbfront/xenkbd.c      Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/xen/fbfront/xenkbd.c      Wed Mar 05 17:28:41 2008 +0000
@@ -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;
diff -r 2da185c11693 -r 5baef0e18e36 drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c   Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/xen/netfront/netfront.c   Wed Mar 05 17:28:41 2008 +0000
@@ -536,6 +536,8 @@ static void backend_changed(struct xenbu
        case XenbusStateInitialising:
        case XenbusStateInitialised:
        case XenbusStateConnected:
+       case XenbusStateReconfiguring:
+       case XenbusStateReconfigured:
        case XenbusStateUnknown:
        case XenbusStateClosed:
                break;
diff -r 2da185c11693 -r 5baef0e18e36 drivers/xen/pcifront/pci_op.c
--- a/drivers/xen/pcifront/pci_op.c     Wed Mar 05 17:28:04 2008 +0000
+++ b/drivers/xen/pcifront/pci_op.c     Wed Mar 05 17:28:41 2008 +0000
@@ -359,7 +359,6 @@ int pcifront_rescan_root(struct pcifront
        struct pci_bus *b;
        struct pci_dev *d;
        unsigned int devfn;
-       int err = 0;
 
 #ifndef CONFIG_PCI_DOMAINS
        if (domain != 0) {
@@ -367,8 +366,7 @@ int pcifront_rescan_root(struct pcifront
                        "PCI Root in non-zero PCI Domain! domain=%d\n", domain);
                dev_err(&pdev->xdev->dev,
                        "Please compile with CONFIG_PCI_DOMAINS\n");
-               err = -EINVAL;
-               goto err_out;
+               return -EINVAL;
        }
 #endif
 
@@ -401,8 +399,7 @@ int pcifront_rescan_root(struct pcifront
                }
        }
 
-      err_out:
-       return err;
+       return 0;
 }
 
 static void free_root_bus_devs(struct pci_bus *bus)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.