xen/blkback: Fix checkpatch warnings of xenbus.c
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
e5f4b3c498
commit
d6091b217d
1 changed files with 12 additions and 9 deletions
|
@ -25,10 +25,9 @@
|
||||||
#undef DPRINTK
|
#undef DPRINTK
|
||||||
#define DPRINTK(fmt, args...) \
|
#define DPRINTK(fmt, args...) \
|
||||||
pr_debug("blkback/xenbus (%s:%d) " fmt ".\n", \
|
pr_debug("blkback/xenbus (%s:%d) " fmt ".\n", \
|
||||||
__FUNCTION__, __LINE__, ##args)
|
__func__, __LINE__, ##args)
|
||||||
|
|
||||||
struct backend_info
|
struct backend_info {
|
||||||
{
|
|
||||||
struct xenbus_device *dev;
|
struct xenbus_device *dev;
|
||||||
struct blkif_st *blkif;
|
struct blkif_st *blkif;
|
||||||
struct xenbus_watch backend_watch;
|
struct xenbus_watch backend_watch;
|
||||||
|
@ -56,7 +55,8 @@ static int blkback_name(struct blkif_st *blkif, char *buf)
|
||||||
if (IS_ERR(devpath))
|
if (IS_ERR(devpath))
|
||||||
return PTR_ERR(devpath);
|
return PTR_ERR(devpath);
|
||||||
|
|
||||||
if ((devname = strstr(devpath, "/dev/")) != NULL)
|
devname = strstr(devpath, "/dev/");
|
||||||
|
if (devname != NULL)
|
||||||
devname += strlen("/dev/");
|
devname += strlen("/dev/");
|
||||||
else
|
else
|
||||||
devname = devpath;
|
devname = devpath;
|
||||||
|
@ -327,7 +327,10 @@ static void backend_changed(struct xenbus_watch *watch,
|
||||||
/* Front end dir is a number, which is used as the handle. */
|
/* Front end dir is a number, which is used as the handle. */
|
||||||
|
|
||||||
char *p = strrchr(dev->otherend, '/') + 1;
|
char *p = strrchr(dev->otherend, '/') + 1;
|
||||||
long handle = simple_strtoul(p, NULL, 0);
|
long handle;
|
||||||
|
err = strict_strtoul(p, 0, &handle);
|
||||||
|
if (err)
|
||||||
|
return;
|
||||||
|
|
||||||
be->major = major;
|
be->major = major;
|
||||||
be->minor = minor;
|
be->minor = minor;
|
||||||
|
@ -369,7 +372,7 @@ static void frontend_changed(struct xenbus_device *dev,
|
||||||
case XenbusStateInitialising:
|
case XenbusStateInitialising:
|
||||||
if (dev->state == XenbusStateClosed) {
|
if (dev->state == XenbusStateClosed) {
|
||||||
printk(KERN_INFO "%s: %s: prepare for reconnect\n",
|
printk(KERN_INFO "%s: %s: prepare for reconnect\n",
|
||||||
__FUNCTION__, dev->nodename);
|
__func__, dev->nodename);
|
||||||
xenbus_switch_state(dev, XenbusStateInitWait);
|
xenbus_switch_state(dev, XenbusStateInitWait);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -494,8 +497,8 @@ static int connect_ring(struct backend_info *be)
|
||||||
|
|
||||||
DPRINTK("%s", dev->otherend);
|
DPRINTK("%s", dev->otherend);
|
||||||
|
|
||||||
err = xenbus_gather(XBT_NIL, dev->otherend, "ring-ref", "%lu", &ring_ref,
|
err = xenbus_gather(XBT_NIL, dev->otherend, "ring-ref", "%lu",
|
||||||
"event-channel", "%u", &evtchn, NULL);
|
&ring_ref, "event-channel", "%u", &evtchn, NULL);
|
||||||
if (err) {
|
if (err) {
|
||||||
xenbus_dev_fatal(dev, err,
|
xenbus_dev_fatal(dev, err,
|
||||||
"reading %s/ring-ref and event-channel",
|
"reading %s/ring-ref and event-channel",
|
||||||
|
|
Loading…
Add table
Reference in a new issue