Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251227
b: refs/heads/master
c: d6091b2
h: refs/heads/master
i:
  251225: 8309545
  251223: 26ce5b0
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent 1350165 commit 895bc43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5f4b3c498623fc3d83f6d92e00a2b2dbf500cd0
refs/heads/master: d6091b217dd4fdabc4a8cd6fa61775f1e3eb6efe
21 changes: 12 additions & 9 deletions trunk/drivers/xen/blkback/xenbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
#undef DPRINTK
#define DPRINTK(fmt, args...) \
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 blkif_st *blkif;
struct xenbus_watch backend_watch;
Expand Down Expand Up @@ -56,7 +55,8 @@ static int blkback_name(struct blkif_st *blkif, char *buf)
if (IS_ERR(devpath))
return PTR_ERR(devpath);

if ((devname = strstr(devpath, "/dev/")) != NULL)
devname = strstr(devpath, "/dev/");
if (devname != NULL)
devname += strlen("/dev/");
else
devname = devpath;
Expand Down Expand Up @@ -153,7 +153,7 @@ int xenvbd_sysfs_addif(struct xenbus_device *dev)
int error;

error = device_create_file(&dev->dev, &dev_attr_physical_device);
if (error)
if (error)
goto fail1;

error = device_create_file(&dev->dev, &dev_attr_mode);
Expand Down Expand Up @@ -327,7 +327,10 @@ static void backend_changed(struct xenbus_watch *watch,
/* Front end dir is a number, which is used as the handle. */

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->minor = minor;
Expand Down Expand Up @@ -369,7 +372,7 @@ static void frontend_changed(struct xenbus_device *dev,
case XenbusStateInitialising:
if (dev->state == XenbusStateClosed) {
printk(KERN_INFO "%s: %s: prepare for reconnect\n",
__FUNCTION__, dev->nodename);
__func__, dev->nodename);
xenbus_switch_state(dev, XenbusStateInitWait);
}
break;
Expand Down Expand Up @@ -494,8 +497,8 @@ static int connect_ring(struct backend_info *be)

DPRINTK("%s", dev->otherend);

err = xenbus_gather(XBT_NIL, dev->otherend, "ring-ref", "%lu", &ring_ref,
"event-channel", "%u", &evtchn, NULL);
err = xenbus_gather(XBT_NIL, dev->otherend, "ring-ref", "%lu",
&ring_ref, "event-channel", "%u", &evtchn, NULL);
if (err) {
xenbus_dev_fatal(dev, err,
"reading %s/ring-ref and event-channel",
Expand Down

0 comments on commit 895bc43

Please sign in to comment.