WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [LINUX] Fix code indentation in Linux dri

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Fix code indentation in Linux drivers.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Jun 2006 00:35:35 +0000
Delivery-date: Mon, 12 Jun 2006 17:37:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID cede50ca17044ac7cee52ccd708043d3b249a0cc
# Parent  bb89ec7765c75321bb7ed0dca20e6c044da4d13c
[LINUX] Fix code indentation in Linux drivers.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c     |   20 +++-----
 linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c     |    6 +-
 linux-2.6-xen-sparse/drivers/xen/blkback/common.h      |    5 +-
 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c   |    4 -
 linux-2.6-xen-sparse/drivers/xen/blkfront/block.h      |   10 ++--
 linux-2.6-xen-sparse/drivers/xen/char/mem.c            |    8 +--
 linux-2.6-xen-sparse/drivers/xen/console/console.c     |    2 
 linux-2.6-xen-sparse/drivers/xen/core/gnttab.c         |    6 +-
 linux-2.6-xen-sparse/drivers/xen/core/reboot.c         |    4 -
 linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c       |    6 +-
 linux-2.6-xen-sparse/drivers/xen/netback/common.h      |   13 ++---
 linux-2.6-xen-sparse/drivers/xen/netback/interface.c   |    2 
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c     |   36 +++++++--------
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c   |   14 ++---
 linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c     |    4 -
 linux-2.6-xen-sparse/drivers/xen/tpmback/common.h      |   16 +++---
 linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c      |   40 ++++++++---------
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c |   33 +++++++-------
 18 files changed, 115 insertions(+), 114 deletions(-)

diff -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Mon Jun 12 
18:32:47 2006 +0100
@@ -222,7 +222,7 @@ static int increase_reservation(unsigned
                /* 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_w
        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 n
                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 *fi
 }
 
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Jun 12 
18:32:47 2006 +0100
@@ -110,7 +110,7 @@ static void dispatch_rw_block_io(blkif_t
                                 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
                        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
 
 
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Mon Jun 12 18:32:47 
2006 +0100
@@ -45,8 +45,9 @@
 #include <xen/gnttab.h>
 #include <xen/driver_util.h>
 
-#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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Jun 12 
18:32:47 2006 +0100
@@ -318,7 +318,7 @@ static void connect(struct blkfront_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, s
 
 
 int blkif_ioctl(struct inode *inode, struct file *filep,
-                unsigned command, unsigned long argument)
+               unsigned command, unsigned long argument)
 {
        int i;
 
diff -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/blkfront/block.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Mon Jun 12 18:32:47 
2006 +0100
@@ -59,15 +59,15 @@
 #include <asm/uaccess.h>
 
 #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 int blkif_open(struct inode *inod
 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 -r bb89ec7765c7 -r cede50ca1704 linux-2.6-xen-sparse/drivers/xen/char/mem.c
--- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c       Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c       Mon Jun 12 18:32:47 
2006 +0100
@@ -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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/console/console.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/console.c        Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c        Mon Jun 12 
18:32:47 2006 +0100
@@ -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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Mon Jun 12 18:32:47 
2006 +0100
@@ -220,9 +220,9 @@ unsigned long gnttab_end_foreign_transfe
        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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Mon Jun 12 18:32:47 
2006 +0100
@@ -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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c  Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c  Mon Jun 12 18:32:47 
2006 +0100
@@ -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 *
 }
 
 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 p
 }
 
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/netback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Mon Jun 12 18:32:47 
2006 +0100
@@ -47,12 +47,13 @@
 #include <xen/gnttab.h>
 #include <xen/driver_util.h>
 
-#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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/netback/interface.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c      Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c      Mon Jun 12 
18:32:47 2006 +0100
@@ -124,7 +124,7 @@ netif_t *netif_alloc(domid_t domid, unsi
                 * 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Jun 12 
18:32:47 2006 +0100
@@ -43,14 +43,14 @@ static void netif_idx_release(u16 pendin
 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 
                        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
 
                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 *
 }
 
 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 *ne
 }
 
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Mon Jun 12 
18:32:47 2006 +0100
@@ -138,13 +138,13 @@ static inline unsigned short get_id_from
        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 *);
@@ -846,10 +846,10 @@ static int netif_poll(struct net_device 
                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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Mon Jun 12 
18:32:47 2006 +0100
@@ -39,7 +39,7 @@ static DECLARE_BITMAP(hypercall_permissi
 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_fi
 };
 
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/tpmback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Mon Jun 12 18:32:47 
2006 +0100
@@ -17,8 +17,9 @@
 #include <asm/io.h>
 #include <asm/pgalloc.h>
 
-#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 vtpm_release_packets(tpmif_t * tpmif
 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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Mon Jun 12 18:23:42 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Mon Jun 12 18:32:47 
2006 +0100
@@ -41,9 +41,9 @@ static void connect(struct backend_info 
 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_
 }
 
 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_d
        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 xenbu
        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 xenbu
 
 
 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 xenb
        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
         * 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_i
        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_i
 
        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_i
                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 -r bb89ec7765c7 -r cede50ca1704 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Mon Jun 12 
18:23:42 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Mon Jun 12 
18:32:47 2006 +0100
@@ -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 <linux/kernel.h>
 #include <linux/err.h>
@@ -817,18 +818,18 @@ static int resume_dev(struct device *dev
                       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 *fil
 }
 
 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;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] Fix code indentation in Linux drivers., Xen patchbot-unstable <=