From: kfraser@dhcp93.uk.xensource.com Date: Mon, 12 Jun 2006 17:32:47 +0000 (+0100) Subject: [LINUX] Fix code indentation in Linux drivers. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15972^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ea266bc5e853ab221f543b0270b4e06156cbc3eb;p=xen.git [LINUX] Fix code indentation in Linux drivers. Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 3a57fabbd0..da1a7eca1c 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -222,7 +222,7 @@ static int increase_reservation(unsigned long nr_pages) /* Update P->M and M->P tables. */ set_phys_to_machine(pfn, frame_list[i]); xen_machphys_update(frame_list[i], pfn); - + /* Link back into the page tables if not highmem. */ if (pfn < max_low_pfn) { int ret; @@ -382,18 +382,17 @@ static void watch_target(struct xenbus_watch *watch, if (err != 1) { /* This is ok (for domain0 at least) - so just return */ return; - } - + } + /* The given memory/target value is in KiB, so it needs converting to - pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. - */ + * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. + */ set_new_target(new_target >> (PAGE_SHIFT - 10)); - } static int balloon_init_watcher(struct notifier_block *notifier, - unsigned long event, - void *data) + unsigned long event, + void *data) { int err; @@ -402,11 +401,10 @@ static int balloon_init_watcher(struct notifier_block *notifier, printk(KERN_ERR "Failed to set balloon watcher\n"); return NOTIFY_DONE; - } static int balloon_write(struct file *file, const char __user *buffer, - unsigned long count, void *data) + unsigned long count, void *data) { char memstring[64], *endchar; unsigned long long target_bytes; @@ -430,7 +428,7 @@ static int balloon_write(struct file *file, const char __user *buffer, } static int balloon_read(char *page, char **start, off_t off, - int count, int *eof, void *data) + int count, int *eof, void *data) { int len; diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c index 16390e2c8d..ace6dbcc37 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c @@ -110,7 +110,7 @@ static void dispatch_rw_block_io(blkif_t *blkif, blkif_request_t *req, pending_req_t *pending_req); static void make_response(blkif_t *blkif, unsigned long id, - unsigned short op, int st); + unsigned short op, int st); /****************************************************************** * misc small helpers @@ -434,7 +434,7 @@ static void dispatch_rw_block_io(blkif_t *blkif, bio = biolist[nbio++] = bio_alloc(GFP_KERNEL, nseg-i); if (unlikely(bio == NULL)) goto fail_put_bio; - + bio->bi_bdev = preq.bdev; bio->bi_private = pending_req; bio->bi_end_io = end_block_io_op; @@ -471,7 +471,7 @@ static void dispatch_rw_block_io(blkif_t *blkif, static void make_response(blkif_t *blkif, unsigned long id, - unsigned short op, int st) + unsigned short op, int st) { blkif_response_t *resp; unsigned long flags; diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h index d013d74d2f..0ba7c588dd 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h @@ -45,8 +45,9 @@ #include #include -#define DPRINTK(_f, _a...) pr_debug("(file=%s, line=%d) " _f, \ - __FILE__ , __LINE__ , ## _a ) +#define DPRINTK(_f, _a...) \ + pr_debug("(file=%s, line=%d) " _f, \ + __FILE__ , __LINE__ , ## _a ) struct vbd { blkif_vdev_t handle; /* what the domain refers to this vbd as */ diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 9a7703dcfa..433d7389fe 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -318,7 +318,7 @@ static void connect(struct blkfront_info *info) err = xlvbd_add(sectors, info->vdevice, binfo, sector_size, info); if (err) { xenbus_dev_fatal(info->xbdev, err, "xlvbd_add at %s", - info->xbdev->otherend); + info->xbdev->otherend); return; } @@ -444,7 +444,7 @@ int blkif_release(struct inode *inode, struct file *filep) int blkif_ioctl(struct inode *inode, struct file *filep, - unsigned command, unsigned long argument) + unsigned command, unsigned long argument) { int i; diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h index 91f152dacf..5ba3d1ebc3 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h @@ -59,15 +59,15 @@ #include #if 1 -#define IPRINTK(fmt, args...) \ - printk(KERN_INFO "xen_blk: " fmt, ##args) +#define IPRINTK(fmt, args...) \ + printk(KERN_INFO "xen_blk: " fmt, ##args) #else #define IPRINTK(fmt, args...) ((void)0) #endif #if 1 -#define WPRINTK(fmt, args...) \ - printk(KERN_WARNING "xen_blk: " fmt, ##args) +#define WPRINTK(fmt, args...) \ + printk(KERN_WARNING "xen_blk: " fmt, ##args) #else #define WPRINTK(fmt, args...) ((void)0) #endif @@ -139,7 +139,7 @@ extern spinlock_t blkif_io_lock; extern int blkif_open(struct inode *inode, struct file *filep); extern int blkif_release(struct inode *inode, struct file *filep); extern int blkif_ioctl(struct inode *inode, struct file *filep, - unsigned command, unsigned long argument); + unsigned command, unsigned long argument); extern int blkif_getgeo(struct block_device *, struct hd_geometry *); extern int blkif_check(dev_t dev); extern int blkif_revalidate(dev_t dev); diff --git a/linux-2.6-xen-sparse/drivers/xen/char/mem.c b/linux-2.6-xen-sparse/drivers/xen/char/mem.c index a295d33ba1..6576135c99 100644 --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c @@ -30,10 +30,10 @@ static inline int uncached_access(struct file *file) { - if (file->f_flags & O_SYNC) - return 1; - /* Xen sets correct MTRR type on non-RAM for us. */ - return 0; + if (file->f_flags & O_SYNC) + return 1; + /* Xen sets correct MTRR type on non-RAM for us. */ + return 0; } /* diff --git a/linux-2.6-xen-sparse/drivers/xen/console/console.c b/linux-2.6-xen-sparse/drivers/xen/console/console.c index edc44b73cb..8553d76a76 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c @@ -364,7 +364,7 @@ void xencons_tx(void) /* Privileged receive callback and transmit kicker. */ static irqreturn_t xencons_priv_interrupt(int irq, void *dev_id, - struct pt_regs *regs) + struct pt_regs *regs) { static char rbuf[16]; int l; diff --git a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c index a85589eb95..f97d659f07 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c @@ -220,9 +220,9 @@ unsigned long gnttab_end_foreign_transfer_ref(grant_ref_t ref) u16 flags; /* - * If a transfer is not even yet started, try to reclaim the grant - * reference and return failure (== 0). - */ + * If a transfer is not even yet started, try to reclaim the grant + * reference and return failure (== 0). + */ while (!((flags = shared[ref].flags) & GTF_transfer_committed)) { if (synch_cmpxchg(&shared[ref].flags, flags, 0) == flags) return 0; diff --git a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c index 9ef9e1a689..a039a292ea 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c @@ -336,8 +336,8 @@ static struct xenbus_watch sysrq_watch = { }; static int setup_shutdown_watcher(struct notifier_block *notifier, - unsigned long event, - void *data) + unsigned long event, + void *data) { int err; diff --git a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c index 9e8503f34b..76bfab82e6 100644 --- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c +++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c @@ -93,7 +93,7 @@ void evtchn_device_upcall(int port) } static ssize_t evtchn_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos) + size_t count, loff_t *ppos) { int rc; unsigned int c, p, bytes1 = 0, bytes2 = 0; @@ -153,7 +153,7 @@ static ssize_t evtchn_read(struct file *file, char __user *buf, } static ssize_t evtchn_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) + size_t count, loff_t *ppos) { int rc, i; evtchn_port_t *kbuf = (evtchn_port_t *)__get_free_page(GFP_KERNEL); @@ -201,7 +201,7 @@ static void evtchn_bind_to_user(struct per_user_data *u, int port) } static int evtchn_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) + unsigned int cmd, unsigned long arg) { int rc; struct per_user_data *u = file->private_data; diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/common.h b/linux-2.6-xen-sparse/drivers/xen/netback/common.h index 5997a70875..c52aaa5f6c 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h @@ -47,12 +47,13 @@ #include #include -#define DPRINTK(_f, _a...) pr_debug("(file=%s, line=%d) " _f, \ - __FILE__ , __LINE__ , ## _a ) -#define IPRINTK(fmt, args...) \ - printk(KERN_INFO "xen_net: " fmt, ##args) -#define WPRINTK(fmt, args...) \ - printk(KERN_WARNING "xen_net: " fmt, ##args) +#define DPRINTK(_f, _a...) \ + pr_debug("(file=%s, line=%d) " _f, \ + __FILE__ , __LINE__ , ## _a ) +#define IPRINTK(fmt, args...) \ + printk(KERN_INFO "xen_net: " fmt, ##args) +#define WPRINTK(fmt, args...) \ + printk(KERN_WARNING "xen_net: " fmt, ##args) typedef struct netif_st { /* Unique identifier for this interface. */ diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c index 8e2289408a..dbd8a7e804 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c @@ -124,7 +124,7 @@ netif_t *netif_alloc(domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN]) * Initialise a dummy MAC address. We choose the numerically * largest non-broadcast address to prevent the address getting * stolen by an Ethernet bridge for STP purposes. - * (FE:FF:FF:FF:FF:FF) + * (FE:FF:FF:FF:FF:FF) */ memset(dev->dev_addr, 0xFF, ETH_ALEN); dev->dev_addr[0] &= ~0x01; diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c index 828b771d29..0250cfa7d7 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c @@ -43,14 +43,14 @@ static void netif_idx_release(u16 pending_idx); static void netif_page_release(struct page *page); static void make_tx_response(netif_t *netif, - u16 id, - s8 st); + u16 id, + s8 st); static int make_rx_response(netif_t *netif, - u16 id, - s8 st, - u16 offset, - u16 size, - u16 flags); + u16 id, + s8 st, + u16 offset, + u16 size, + u16 flags); static void net_tx_action(unsigned long unused); static DECLARE_TASKLET(net_tx_tasklet, net_tx_action, 0); @@ -329,9 +329,9 @@ static void net_rx_action(unsigned long unused) DPRINTK("Bad status %d from grant transfer to DOM%u\n", gop->status, netif->domid); /* - * Page no longer belongs to us unless GNTST_bad_page, - * but that should be a fatal error anyway. - */ + * Page no longer belongs to us unless GNTST_bad_page, + * but that should be a fatal error anyway. + */ BUG_ON(gop->status == GNTST_bad_page); status = NETIF_RSP_ERROR; } @@ -483,7 +483,7 @@ inline static void net_tx_action_dealloc(void) make_tx_response(netif, pending_tx_info[pending_idx].req.id, NETIF_RSP_OKAY); - + pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx; netif_put(netif); @@ -898,8 +898,8 @@ irqreturn_t netif_be_int(int irq, void *dev_id, struct pt_regs *regs) } static void make_tx_response(netif_t *netif, - u16 id, - s8 st) + u16 id, + s8 st) { RING_IDX i = netif->tx.rsp_prod_pvt; netif_tx_response_t *resp; @@ -925,11 +925,11 @@ static void make_tx_response(netif_t *netif, } static int make_rx_response(netif_t *netif, - u16 id, - s8 st, - u16 offset, - u16 size, - u16 flags) + u16 id, + s8 st, + u16 offset, + u16 size, + u16 flags) { RING_IDX i = netif->rx.rsp_prod_pvt; netif_rx_response_t *resp; diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index b0fc28d04c..d6e1d8e185 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -138,14 +138,14 @@ static inline unsigned short get_id_from_freelist(struct sk_buff **list) return id; } -#define DPRINTK(fmt, args...) pr_debug("netfront (%s:%d) " fmt, \ - __FUNCTION__, __LINE__, ##args) +#define DPRINTK(fmt, args...) \ + pr_debug("netfront (%s:%d) " fmt, \ + __FUNCTION__, __LINE__, ##args) #define IPRINTK(fmt, args...) \ printk(KERN_INFO "netfront: " fmt, ##args) #define WPRINTK(fmt, args...) \ printk(KERN_WARNING "netfront: " fmt, ##args) - static int talk_to_backend(struct xenbus_device *, struct netfront_info *); static int setup_device(struct xenbus_device *, struct netfront_info *); static struct net_device *create_netdev(int, struct xenbus_device *); @@ -846,10 +846,10 @@ static int netif_poll(struct net_device *dev, int *pbudget) rx = RING_GET_RESPONSE(&np->rx, i); /* - * This definitely indicates a bug, either in this driver or - * in the backend driver. In future this should flag the bad - * situation to the system controller to reboot the backed. - */ + * This definitely indicates a bug, either in this driver or in + * the backend driver. In future this should flag the bad + * situation to the system controller to reboot the backed. + */ if ((ref = np->grant_rx_ref[rx->id]) == GRANT_INVALID_REF) { WPRINTK("Bad rx response id %d.\n", rx->id); work_done--; diff --git a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c index 824ae648a5..d367c69300 100644 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c @@ -39,7 +39,7 @@ static struct proc_dir_entry *capabilities_intf; static DECLARE_BITMAP(hypercall_permission_map, NR_HYPERCALLS); static int privcmd_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long data) + unsigned int cmd, unsigned long data) { int ret = -ENOSYS; void __user *udata = (void __user *) data; @@ -241,7 +241,7 @@ static struct file_operations privcmd_file_ops = { }; static int capabilities_read(char *page, char **start, off_t off, - int count, int *eof, void *data) + int count, int *eof, void *data) { int len = 0; *page = 0; diff --git a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h index 34ad72d9f2..c0e80fffcc 100644 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h @@ -17,8 +17,9 @@ #include #include -#define DPRINTK(_f, _a...) pr_debug("(file=%s, line=%d) " _f, \ - __FILE__ , __LINE__ , ## _a ) +#define DPRINTK(_f, _a...) \ + pr_debug("(file=%s, line=%d) " _f, \ + __FILE__ , __LINE__ , ## _a ) typedef struct tpmif_st { struct list_head tpmif_list; @@ -68,12 +69,11 @@ int tpmif_vtpm_close(u32 instance); int vtpm_release_packets(tpmif_t * tpmif, int send_msgs); #define tpmif_get(_b) (atomic_inc(&(_b)->refcnt)) -#define tpmif_put(_b) \ - do { \ - if ( atomic_dec_and_test(&(_b)->refcnt) ) \ - tpmif_disconnect_complete(_b); \ - } while (0) - +#define tpmif_put(_b) \ + do { \ + if (atomic_dec_and_test(&(_b)->refcnt)) \ + tpmif_disconnect_complete(_b); \ + } while (0) extern int num_frontends; diff --git a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c index ac015d5109..ee72c83a0d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c @@ -41,9 +41,9 @@ static void maybe_connect(struct backend_info *be); static void connect(struct backend_info *be); static int connect_ring(struct backend_info *be); static void backend_changed(struct xenbus_watch *watch, - const char **vec, unsigned int len); + const char **vec, unsigned int len); static void frontend_changed(struct xenbus_device *dev, - enum xenbus_state frontend_state); + enum xenbus_state frontend_state); static int tpmback_remove(struct xenbus_device *dev) { @@ -67,15 +67,15 @@ static int tpmback_remove(struct xenbus_device *dev) } static int tpmback_probe(struct xenbus_device *dev, - const struct xenbus_device_id *id) + const struct xenbus_device_id *id) { int err; struct backend_info *be = kzalloc(sizeof(struct backend_info), - GFP_KERNEL); + GFP_KERNEL); if (!be) { xenbus_dev_fatal(dev, -ENOMEM, - "allocating backend structure"); + "allocating backend structure"); return -ENOMEM; } @@ -84,8 +84,8 @@ static int tpmback_probe(struct xenbus_device *dev, dev->dev.driver_data = be; err = xenbus_watch_path2(dev, dev->nodename, - "instance", &be->backend_watch, - backend_changed); + "instance", &be->backend_watch, + backend_changed); if (err) { goto fail; } @@ -102,7 +102,7 @@ fail: static void backend_changed(struct xenbus_watch *watch, - const char **vec, unsigned int len) + const char **vec, unsigned int len) { int err; long instance; @@ -111,7 +111,7 @@ static void backend_changed(struct xenbus_watch *watch, struct xenbus_device *dev = be->dev; err = xenbus_scanf(XBT_NIL, dev->nodename, - "instance","%li", &instance); + "instance","%li", &instance); if (XENBUS_EXIST_ERR(err)) { return; } @@ -129,7 +129,7 @@ static void backend_changed(struct xenbus_watch *watch, static void frontend_changed(struct xenbus_device *dev, - enum xenbus_state frontend_state) + enum xenbus_state frontend_state) { struct backend_info *be = dev->dev.driver_data; int err; @@ -167,8 +167,8 @@ static void frontend_changed(struct xenbus_device *dev, case XenbusStateInitWait: default: xenbus_dev_fatal(dev, -EINVAL, - "saw state %d at frontend", - frontend_state); + "saw state %d at frontend", + frontend_state); break; } } @@ -188,11 +188,11 @@ static void maybe_connect(struct backend_info *be) * Notify the vTPM manager about a new front-end. */ err = tpmif_vtpm_open(be->tpmif, - be->frontend_id, - be->instance); + be->frontend_id, + be->instance); if (err) { xenbus_dev_error(be->dev, err, - "queueing vtpm open packet"); + "queueing vtpm open packet"); /* * Should close down this device and notify FE * about closure. @@ -217,7 +217,7 @@ again: } err = xenbus_printf(xbt, be->dev->nodename, - "ready", "%lu", ready); + "ready", "%lu", ready); if (err) { xenbus_dev_fatal(be->dev, err, "writing 'ready'"); goto abort; @@ -246,7 +246,7 @@ static int connect_ring(struct backend_info *be) int err; err = xenbus_gather(XBT_NIL, dev->otherend, - "ring-ref", "%lu", &ring_ref, + "ring-ref", "%lu", &ring_ref, "event-channel", "%u", &evtchn, NULL); if (err) { xenbus_dev_error(dev, err, @@ -257,7 +257,7 @@ static int connect_ring(struct backend_info *be) if (!be->tpmif) { be->tpmif = tpmif_find(dev->otherend_id, - be->instance); + be->instance); if (IS_ERR(be->tpmif)) { err = PTR_ERR(be->tpmif); be->tpmif = NULL; @@ -270,8 +270,8 @@ static int connect_ring(struct backend_info *be) err = tpmif_map(be->tpmif, ring_ref, evtchn); if (err) { xenbus_dev_error(dev, err, - "mapping shared-frame %lu port %u", - ring_ref, evtchn); + "mapping shared-frame %lu port %u", + ring_ref, evtchn); return err; } } diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 3bef9b3084..137529b79b 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -30,8 +30,9 @@ * IN THE SOFTWARE. */ -#define DPRINTK(fmt, args...) \ - pr_debug("xenbus_probe (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args) +#define DPRINTK(fmt, args...) \ + pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ + __FUNCTION__, __LINE__, ##args) #include #include @@ -817,18 +818,18 @@ static int resume_dev(struct device *dev, void *data) dev->bus_id, err); return err; } - + xdev->state = XenbusStateInitialising; - + if (drv->resume) { err = drv->resume(xdev); - if (err) { - printk(KERN_WARNING - "xenbus: resume %s failed: %i\n", - dev->bus_id, err); - return err; - } - } + if (err) { + printk(KERN_WARNING + "xenbus: resume %s failed: %i\n", + dev->bus_id, err); + return err; + } + } err = watch_otherend(xdev); if (err) { @@ -945,7 +946,7 @@ static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma) } static int xsd_kva_read(char *page, char **start, off_t off, - int count, int *eof, void *data) + int count, int *eof, void *data) { int len; @@ -1044,10 +1045,10 @@ static int __init xenbus_probe_init(void) free_page(page); /* - * Do not unregister the xenbus front/backend buses here. The - * buses must exist because front/backend drivers will use - * them when they are registered. - */ + * Do not unregister the xenbus front/backend buses here. The buses + * must exist because front/backend drivers will use them when they are + * registered. + */ return err; }