xen: Fix coding style errors

Fixes the following errors:
 * ERROR: line over 90 characters
 * ERROR: code indent should never use tabs
 * ERROR: space prohibited after that open square bracket '['
 * ERROR: do not initialise statics to 0 or NULL
 * ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Emil Condrea <emilcondrea@gmail.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Quan Xu <xuquan8@huawei.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Emil Condrea 2016-10-25 08:50:07 +03:00 committed by Stefano Stabellini
parent 5b2ecabaea
commit c22e91b1d8
4 changed files with 76 additions and 64 deletions

View file

@ -54,7 +54,7 @@ static QTAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup =
QTAILQ_HEAD_INITIALIZER(xs_cleanup);
static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = QTAILQ_HEAD_INITIALIZER(xendevs);
static int debug = 0;
static int debug;
/* ------------------------------------------------------------- */
@ -215,13 +215,13 @@ int xenstore_read_fe_uint64(struct XenDevice *xendev, const char *node, uint64_t
const char *xenbus_strstate(enum xenbus_state state)
{
static const char *const name[] = {
[ XenbusStateUnknown ] = "Unknown",
[ XenbusStateInitialising ] = "Initialising",
[ XenbusStateInitWait ] = "InitWait",
[ XenbusStateInitialised ] = "Initialised",
[ XenbusStateConnected ] = "Connected",
[ XenbusStateClosing ] = "Closing",
[ XenbusStateClosed ] = "Closed",
[XenbusStateUnknown] = "Unknown",
[XenbusStateInitialising] = "Initialising",
[XenbusStateInitWait] = "InitWait",
[XenbusStateInitialised] = "Initialised",
[XenbusStateConnected] = "Connected",
[XenbusStateClosing] = "Closing",
[XenbusStateClosed] = "Closed",
};
return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID";
}
@ -702,10 +702,10 @@ static void xenstore_update(void *unused)
if (sscanf(vec[XS_WATCH_TOKEN], "be:%" PRIxPTR ":%d:%" PRIxPTR,
&type, &dom, &ops) == 3) {
xenstore_update_be(vec[XS_WATCH_PATH], (void*)type, dom, (void*)ops);
xenstore_update_be(vec[XS_WATCH_PATH], (void *)type, dom, (void*)ops);
}
if (sscanf(vec[XS_WATCH_TOKEN], "fe:%" PRIxPTR, &ptr) == 1) {
xenstore_update_fe(vec[XS_WATCH_PATH], (void*)ptr);
xenstore_update_fe(vec[XS_WATCH_PATH], (void *)ptr);
}
cleanup: