summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-21 18:17:45 +0200
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2017-08-31 09:45:55 -0400
commitfefcfb9935be0208ff522563239f11a04f98c27d (patch)
tree13364815524f1c956b20c0f85453f14b142a2dbd /drivers/xen
parenta0e4fd14ba0b90b6fcea9c0f7f6de6886479427d (diff)
downloadop-kernel-dev-fefcfb9935be0208ff522563239f11a04f98c27d.zip
op-kernel-dev-fefcfb9935be0208ff522563239f11a04f98c27d.tar.gz
xen/pvcalls: use WARN_ON(1) instead of __WARN()
__WARN() is an internal helper that is only available on some architectures, but causes a build error e.g. on ARM64 in some configurations: drivers/xen/pvcalls-back.c: In function 'set_backend_state': drivers/xen/pvcalls-back.c:1097:5: error: implicit declaration of function '__WARN' [-Werror=implicit-function-declaration] Unfortunately, there is no equivalent of BUG() that takes no arguments, but WARN_ON(1) is commonly used in other drivers and works on all configurations. Fixes: 7160378206b2 ("xen/pvcalls: xenbus state handling") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/pvcalls-back.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c
index 3201a0c..b209cd4 100644
--- a/drivers/xen/pvcalls-back.c
+++ b/drivers/xen/pvcalls-back.c
@@ -1098,7 +1098,7 @@ static void set_backend_state(struct xenbus_device *dev,
xenbus_switch_state(dev, XenbusStateClosing);
break;
default:
- __WARN();
+ WARN_ON(1);
}
break;
case XenbusStateInitWait:
@@ -1113,7 +1113,7 @@ static void set_backend_state(struct xenbus_device *dev,
xenbus_switch_state(dev, XenbusStateClosing);
break;
default:
- __WARN();
+ WARN_ON(1);
}
break;
case XenbusStateConnected:
@@ -1127,7 +1127,7 @@ static void set_backend_state(struct xenbus_device *dev,
xenbus_switch_state(dev, XenbusStateClosing);
break;
default:
- __WARN();
+ WARN_ON(1);
}
break;
case XenbusStateClosing:
@@ -1138,11 +1138,11 @@ static void set_backend_state(struct xenbus_device *dev,
xenbus_switch_state(dev, XenbusStateClosed);
break;
default:
- __WARN();
+ WARN_ON(1);
}
break;
default:
- __WARN();
+ WARN_ON(1);
}
}
}
OpenPOWER on IntegriCloud