mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-08 09:18:29 +00:00
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>
This commit is contained in:
parent
a0e4fd14ba
commit
fefcfb9935
@ -1098,7 +1098,7 @@ static void set_backend_state(struct xenbus_device *dev,
|
|||||||
xenbus_switch_state(dev, XenbusStateClosing);
|
xenbus_switch_state(dev, XenbusStateClosing);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__WARN();
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XenbusStateInitWait:
|
case XenbusStateInitWait:
|
||||||
@ -1113,7 +1113,7 @@ static void set_backend_state(struct xenbus_device *dev,
|
|||||||
xenbus_switch_state(dev, XenbusStateClosing);
|
xenbus_switch_state(dev, XenbusStateClosing);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__WARN();
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XenbusStateConnected:
|
case XenbusStateConnected:
|
||||||
@ -1127,7 +1127,7 @@ static void set_backend_state(struct xenbus_device *dev,
|
|||||||
xenbus_switch_state(dev, XenbusStateClosing);
|
xenbus_switch_state(dev, XenbusStateClosing);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__WARN();
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XenbusStateClosing:
|
case XenbusStateClosing:
|
||||||
@ -1138,11 +1138,11 @@ static void set_backend_state(struct xenbus_device *dev,
|
|||||||
xenbus_switch_state(dev, XenbusStateClosed);
|
xenbus_switch_state(dev, XenbusStateClosed);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__WARN();
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
__WARN();
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user