xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] libxc: Fix some whitespace/tab-width problems
@ 2013-12-17 16:21 Ian Jackson
  2013-12-17 16:21 ` [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces Ian Jackson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ian Jackson @ 2013-12-17 16:21 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Campbell, Stefano Stabellini

I have here two interrelated whitespace formatting fixes for libxc:

 1/2 libxc: Remove hard tabs which ought to be 4 spaces
 2/2 libxc: Remove "tab-width: 8" from emacs local variables

There is no functional change, as is easily verifiable.

I would like to propose these for a freeze exception for Xen 4.4, on
the basis that it will make it marginally easier to port future
patches to 4.4 if we don't have to deal with whitespace conflicts.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces
  2013-12-17 16:21 [PATCH 0/2] libxc: Fix some whitespace/tab-width problems Ian Jackson
@ 2013-12-17 16:21 ` Ian Jackson
  2013-12-17 16:44   ` Ian Campbell
  2013-12-17 16:21 ` [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections Ian Jackson
  2013-12-18 11:53 ` git-filter-branch automatic CC adding script Ian Jackson
  2 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2013-12-17 16:21 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell, Stefano Stabellini

Some of the files in libxc have hard tabs.  Many (but not all) of
libxc's files have an emacs local variable section declaring tab-width
to be 4.

Of the files which have both of these properties, some of the tabs are
supposed to stand for 4 spaces and some of them 8.

Replace the ones where they are supposed to stand for 4 spaces with
actual spaces.  After this patch the only hard tabs in libxc are ones
which expect to expand to 8 spaces.  This will allow us to remove the
tab-width settings.

I'm not fixing the 8-space tabs to avoid needless whitespace churn.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_compression.c    |    2 +-
 tools/libxc/xc_domain_restore.c |    2 +-
 tools/libxc/xc_gnttab.c         |   20 ++++++++++----------
 tools/libxc/xc_linux_osdep.c    |    6 +++---
 tools/libxc/xc_minios.c         |   22 +++++++++++-----------
 tools/libxc/xc_netbsd.c         |   10 +++++-----
 6 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/tools/libxc/xc_compression.c b/tools/libxc/xc_compression.c
index 8f0b89d..74c4c5d 100644
--- a/tools/libxc/xc_compression.c
+++ b/tools/libxc/xc_compression.c
@@ -226,7 +226,7 @@ char *get_cache_page(comp_ctx *ctx, xen_pfn_t pfn,
         ctx->pfn2cache[pfn] = item;
     }
         
-    /* 	if requested item is in cache move to head of list */
+    /* if requested item is in cache move to head of list */
     if (item != ctx->page_list_head)
     {
         if (item == ctx->page_list_tail)
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index 80769a7..7ffa15d 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -2200,7 +2200,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
     /* clear any pending events and the selector */
     MEMSET_ARRAY_FIELD(new_shared_info, evtchn_pending, 0);
     for ( i = 0; i < XEN_LEGACY_MAX_VCPUS; i++ )
-	    SET_FIELD(new_shared_info, vcpu_info[i].evtchn_pending_sel, 0);
+        SET_FIELD(new_shared_info, vcpu_info[i].evtchn_pending_sel, 0);
 
     /* mask event channels */
     MEMSET_ARRAY_FIELD(new_shared_info, evtchn_mask, 0xff);
diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
index 79dab40..f3c4b8e 100644
--- a/tools/libxc/xc_gnttab.c
+++ b/tools/libxc/xc_gnttab.c
@@ -191,22 +191,22 @@ int xc_gnttab_munmap(xc_gnttab *xcg,
                      void *start_address,
                      uint32_t count)
 {
-	return xcg->ops->u.gnttab.munmap(xcg, xcg->ops_handle,
-					 start_address, count);
+    return xcg->ops->u.gnttab.munmap(xcg, xcg->ops_handle,
+                                     start_address, count);
 }
 
 int xc_gnttab_set_max_grants(xc_gnttab *xcg, uint32_t count)
 {
-	if (!xcg->ops->u.gnttab.set_max_grants)
-		return 0;
-	return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count);
+    if (!xcg->ops->u.gnttab.set_max_grants)
+        return 0;
+    return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count);
 }
 
 void *xc_gntshr_share_pages(xc_gntshr *xcg, uint32_t domid,
                             int count, uint32_t *refs, int writable)
 {
-	return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle, domid,
-	                                      count, refs, writable, -1, -1);
+    return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle, domid,
+                                          count, refs, writable, -1, -1);
 }
 
 void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
@@ -214,7 +214,7 @@ void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
                                   uint32_t notify_offset,
                                   evtchn_port_t notify_port)
 {
-	return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle,
+    return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle,
 			domid, 1, ref, writable, notify_offset, notify_port);
 }
 
@@ -224,8 +224,8 @@ void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
  */
 int xc_gntshr_munmap(xc_gntshr *xcg, void *start_address, uint32_t count)
 {
-	return xcg->ops->u.gntshr.munmap(xcg, xcg->ops_handle,
-					 start_address, count);
+    return xcg->ops->u.gntshr.munmap(xcg, xcg->ops_handle,
+                                     start_address, count);
 }
 
 
diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
index 73860a2..87c0936 100644
--- a/tools/libxc/xc_linux_osdep.c
+++ b/tools/libxc/xc_linux_osdep.c
@@ -808,9 +808,9 @@ static void *linux_gntshr_share_pages(xc_gntshr *xch, xc_osdep_handle h,
         err = ioctl(fd, IOCTL_GNTALLOC_SET_UNMAP_NOTIFY, &notify);
     if (err) {
         PERROR("linux_gntshr_share_page_notify: ioctl SET_UNMAP_NOTIFY failed");
-		munmap(area, count * XC_PAGE_SIZE);
-		area = NULL;
-	}
+        munmap(area, count * XC_PAGE_SIZE);
+        area = NULL;
+    }
 
     memcpy(refs, gref_info->gref_ids, count * sizeof(uint32_t));
 
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
index dec4d73..d35e3ec 100644
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -89,13 +89,13 @@ static int minios_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcm
 
     call.op = hypercall->op;
     for (i = 0; i < sizeof(hypercall->arg) / sizeof(*hypercall->arg); i++)
-	call.args[i] = hypercall->arg[i];
+        call.args[i] = hypercall->arg[i];
 
     ret = HYPERVISOR_multicall(&call, 1);
 
     if (ret < 0) {
-	errno = -ret;
-	return -1;
+        errno = -ret;
+        return -1;
     }
     if ((long) call.result < 0) {
         errno = - (long) call.result;
@@ -110,9 +110,9 @@ static void *minios_privcmd_map_foreign_bulk(xc_interface *xch, xc_osdep_handle
 {
     unsigned long pt_prot = 0;
     if (prot & PROT_READ)
-	pt_prot = L1_PROT_RO;
+        pt_prot = L1_PROT_RO;
     if (prot & PROT_WRITE)
-	pt_prot = L1_PROT;
+        pt_prot = L1_PROT;
     return map_frames_ex(arr, num, 1, 0, 1, dom, err, pt_prot);    
 }
 
@@ -126,9 +126,9 @@ static void *minios_privcmd_map_foreign_batch(xc_interface *xch,  xc_osdep_handl
     unsigned long addr;
 
     if (prot & PROT_READ)
-	pt_prot = L1_PROT_RO;
+        pt_prot = L1_PROT_RO;
     if (prot & PROT_WRITE)
-	pt_prot = L1_PROT;
+        pt_prot = L1_PROT;
 
     addr = (unsigned long) map_frames_ex(arr, num, 1, 0, 1, dom, err, pt_prot);
     for (i = 0; i < num; i++) {
@@ -146,9 +146,9 @@ static void *minios_privcmd_map_foreign_range(xc_interface *xch, xc_osdep_handle
     unsigned long pt_prot = 0;
 
     if (prot & PROT_READ)
-	pt_prot = L1_PROT_RO;
+        pt_prot = L1_PROT_RO;
     if (prot & PROT_WRITE)
-	pt_prot = L1_PROT;
+        pt_prot = L1_PROT;
 
     assert(!(size % getpagesize()));
     return map_frames_ex(&mfn, size / getpagesize(), 0, 1, 1, dom, NULL, pt_prot);
@@ -165,9 +165,9 @@ static void *minios_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
     void *ret;
 
     if (prot & PROT_READ)
-	pt_prot = L1_PROT_RO;
+        pt_prot = L1_PROT_RO;
     if (prot & PROT_WRITE)
-	pt_prot = L1_PROT;
+        pt_prot = L1_PROT;
 
     mfns = malloc((size / XC_PAGE_SIZE) * sizeof(*mfns));
 
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 8a90ef3..9a831ce 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -181,11 +181,11 @@ static void *netbsd_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
 
 	addr = mmap(NULL, size, prot, MAP_ANON | MAP_SHARED, -1, 0);
 	if (addr == MAP_FAILED)
-		goto mmap_failed;
+            goto mmap_failed;
 
 	for (i = 0; i < nentries; i++) {
-		entries[i].va = (uintptr_t)addr + (i * chunksize);
-		entries[i].npages = chunksize >> XC_PAGE_SHIFT;
+            entries[i].va = (uintptr_t)addr + (i * chunksize);
+            entries[i].npages = chunksize >> XC_PAGE_SHIFT;
 	}
 
 	ioctlx.num   = nentries;
@@ -194,14 +194,14 @@ static void *netbsd_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
 
 	rc = ioctl(fd, IOCTL_PRIVCMD_MMAP, &ioctlx);
 	if (rc)
-		goto ioctl_failed;
+            goto ioctl_failed;
 
 	return addr;
 
 ioctl_failed:
 	rc = munmap(addr, size);
 	if (rc == -1)
-		ERROR("%s: error in error path\n", __FUNCTION__);
+            ERROR("%s: error in error path\n", __FUNCTION__);
 
 mmap_failed:
 	return NULL;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections
  2013-12-17 16:21 [PATCH 0/2] libxc: Fix some whitespace/tab-width problems Ian Jackson
  2013-12-17 16:21 ` [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces Ian Jackson
@ 2013-12-17 16:21 ` Ian Jackson
  2013-12-17 16:47   ` Ian Campbell
  2013-12-18 11:53 ` git-filter-branch automatic CC adding script Ian Jackson
  2 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2013-12-17 16:21 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell, Stefano Stabellini

Tabs must universally expand to 8 spaces.  All the (remaining) hard
tabs in libxc expect this.  Attempting to define an alternative
setting is simply wrong because not all tools (or indeed all emacsen)
will respect it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_compression.c         |    1 -
 tools/libxc/xc_core.c                |    1 -
 tools/libxc/xc_core.h                |    1 -
 tools/libxc/xc_core_arm.c            |    1 -
 tools/libxc/xc_core_arm.h            |    1 -
 tools/libxc/xc_core_x86.c            |    1 -
 tools/libxc/xc_core_x86.h            |    1 -
 tools/libxc/xc_dom.h                 |    1 -
 tools/libxc/xc_dom_arm.c             |    1 -
 tools/libxc/xc_dom_armzimageloader.c |    1 -
 tools/libxc/xc_dom_binloader.c       |    1 -
 tools/libxc/xc_dom_boot.c            |    1 -
 tools/libxc/xc_dom_bzimageloader.c   |    1 -
 tools/libxc/xc_dom_compat_linux.c    |    1 -
 tools/libxc/xc_dom_core.c            |    1 -
 tools/libxc/xc_dom_elfloader.c       |    1 -
 tools/libxc/xc_dom_x86.c             |    1 -
 tools/libxc/xc_domain.c              |    1 -
 tools/libxc/xc_domain_restore.c      |    1 -
 tools/libxc/xc_domain_save.c         |    1 -
 tools/libxc/xc_evtchn.c              |    1 -
 tools/libxc/xc_flask.c               |    1 -
 tools/libxc/xc_foreign_memory.c      |    1 -
 tools/libxc/xc_gnttab.c              |    1 -
 tools/libxc/xc_hcall_buf.c           |    1 -
 tools/libxc/xc_hvm_build_arm.c       |    1 -
 tools/libxc/xc_hvm_build_x86.c       |    1 -
 tools/libxc/xc_linux.c               |    1 -
 tools/libxc/xc_linux_osdep.c         |    1 -
 tools/libxc/xc_minios.c              |    1 -
 tools/libxc/xc_misc.c                |    1 -
 tools/libxc/xc_netbsd.c              |    1 -
 tools/libxc/xc_nomigrate.c           |    1 -
 tools/libxc/xc_pagetab.c             |    1 -
 tools/libxc/xc_private.c             |    1 -
 tools/libxc/xc_solaris.c             |    1 -
 tools/libxc/xc_tmem.c                |    1 -
 tools/libxc/xenctrl_osdep_ENOSYS.c   |    1 -
 tools/libxc/xenctrlosdep.h           |    1 -
 tools/libxc/xg_private.c             |    1 -
 40 files changed, 40 deletions(-)

diff --git a/tools/libxc/xc_compression.c b/tools/libxc/xc_compression.c
index 74c4c5d..50db0f5 100644
--- a/tools/libxc/xc_compression.c
+++ b/tools/libxc/xc_compression.c
@@ -541,7 +541,6 @@ error:
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index 4bc1abb..cea97cd 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -974,7 +974,6 @@ xc_domain_dumpcore(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core.h b/tools/libxc/xc_core.h
index 10cbfca..4314fbe 100644
--- a/tools/libxc/xc_core.h
+++ b/tools/libxc/xc_core.h
@@ -168,7 +168,6 @@ int xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core_arm.c b/tools/libxc/xc_core_arm.c
index 2fbcf3f..e3c4212 100644
--- a/tools/libxc/xc_core_arm.c
+++ b/tools/libxc/xc_core_arm.c
@@ -101,7 +101,6 @@ xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width, xc_do
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core_arm.h b/tools/libxc/xc_core_arm.h
index 24781eb..d4c110c 100644
--- a/tools/libxc/xc_core_arm.h
+++ b/tools/libxc/xc_core_arm.h
@@ -54,7 +54,6 @@ xc_core_arch_context_get_shdr(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c
index e328dcf..6208849 100644
--- a/tools/libxc/xc_core_x86.c
+++ b/tools/libxc/xc_core_x86.c
@@ -214,7 +214,6 @@ xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width, xc_do
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_core_x86.h b/tools/libxc/xc_core_x86.h
index d5e04e7..334cd7d 100644
--- a/tools/libxc/xc_core_x86.h
+++ b/tools/libxc/xc_core_x86.h
@@ -55,7 +55,6 @@ xc_core_arch_context_get_shdr(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h
index 7099cee..763433b 100644
--- a/tools/libxc/xc_dom.h
+++ b/tools/libxc/xc_dom.h
@@ -375,7 +375,6 @@ int arch_setup_bootlate(struct xc_dom_image *dom);
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index a40e04d..17dd5c1 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -326,7 +326,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c
index e6516a1..26ba731 100644
--- a/tools/libxc/xc_dom_armzimageloader.c
+++ b/tools/libxc/xc_dom_armzimageloader.c
@@ -258,7 +258,6 @@ static void __init register_loader(void)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_binloader.c b/tools/libxc/xc_dom_binloader.c
index e1de5b5..c2e7dfb 100644
--- a/tools/libxc/xc_dom_binloader.c
+++ b/tools/libxc/xc_dom_binloader.c
@@ -324,7 +324,6 @@ static void __init register_loader(void)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xc_dom_boot.c
index fdfeaf8..915467d 100644
--- a/tools/libxc/xc_dom_boot.c
+++ b/tools/libxc/xc_dom_boot.c
@@ -436,7 +436,6 @@ int xc_dom_gnttab_init(struct xc_dom_image *dom)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_bzimageloader.c b/tools/libxc/xc_dom_bzimageloader.c
index 2225699..a948909 100644
--- a/tools/libxc/xc_dom_bzimageloader.c
+++ b/tools/libxc/xc_dom_bzimageloader.c
@@ -781,7 +781,6 @@ static void __init register_loader(void)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_compat_linux.c b/tools/libxc/xc_dom_compat_linux.c
index 2c14a0f..c295fd2 100644
--- a/tools/libxc/xc_dom_compat_linux.c
+++ b/tools/libxc/xc_dom_compat_linux.c
@@ -192,7 +192,6 @@ int xc_dom_linux_build(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index 77a4e64..6555caa 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -1028,7 +1028,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c
index 9843b1f..beb0bb9 100644
--- a/tools/libxc/xc_dom_elfloader.c
+++ b/tools/libxc/xc_dom_elfloader.c
@@ -428,7 +428,6 @@ static void __init register_loader(void)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
index e034d62..3e5f789 100644
--- a/tools/libxc/xc_dom_x86.c
+++ b/tools/libxc/xc_dom_x86.c
@@ -955,7 +955,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 1ccafc5..484df77 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -1781,7 +1781,6 @@ int xc_domain_set_max_evtchn(xc_interface *xch, uint32_t domid,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index 7ffa15d..717d370 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -2363,7 +2363,6 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index 42c4752..0fa0a26 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -2140,7 +2140,6 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
index 2e0679e..4aed746 100644
--- a/tools/libxc/xc_evtchn.c
+++ b/tools/libxc/xc_evtchn.c
@@ -128,7 +128,6 @@ int xc_evtchn_unmask(xc_evtchn *xce, evtchn_port_t port)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_flask.c b/tools/libxc/xc_flask.c
index 4294a25..8e99c9a 100644
--- a/tools/libxc/xc_flask.c
+++ b/tools/libxc/xc_flask.c
@@ -437,7 +437,6 @@ int xc_flask_relabel_domain(xc_interface *xch, int domid, uint32_t sid)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libxc/xc_foreign_memory.c
index 7dfc817..9a6c6f5 100644
--- a/tools/libxc/xc_foreign_memory.c
+++ b/tools/libxc/xc_foreign_memory.c
@@ -126,7 +126,6 @@ void *xc_map_foreign_bulk_compat(xc_interface *xch, xc_osdep_handle h,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
index f3c4b8e..500ce59 100644
--- a/tools/libxc/xc_gnttab.c
+++ b/tools/libxc/xc_gnttab.c
@@ -234,7 +234,6 @@ int xc_gntshr_munmap(xc_gntshr *xcg, void *start_address, uint32_t count)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_hcall_buf.c b/tools/libxc/xc_hcall_buf.c
index e762a93..f9d4e31 100644
--- a/tools/libxc/xc_hcall_buf.c
+++ b/tools/libxc/xc_hcall_buf.c
@@ -306,7 +306,6 @@ void xc_hypercall_buffer_array_destroy(xc_interface *xc,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_hvm_build_arm.c b/tools/libxc/xc_hvm_build_arm.c
index ff66689..a484373 100644
--- a/tools/libxc/xc_hvm_build_arm.c
+++ b/tools/libxc/xc_hvm_build_arm.c
@@ -43,7 +43,6 @@ int xc_hvm_build_target_mem(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c
index 77bd365..16374fe 100644
--- a/tools/libxc/xc_hvm_build_x86.c
+++ b/tools/libxc/xc_hvm_build_x86.c
@@ -608,7 +608,6 @@ int xc_hvm_build_target_mem(xc_interface *xch,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_linux.c b/tools/libxc/xc_linux.c
index 6121d80..686d8b7 100644
--- a/tools/libxc/xc_linux.c
+++ b/tools/libxc/xc_linux.c
@@ -72,7 +72,6 @@ void *xc_memalign(xc_interface *xch, size_t alignment, size_t size)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
index 87c0936..cc6bb8f 100644
--- a/tools/libxc/xc_linux_osdep.c
+++ b/tools/libxc/xc_linux_osdep.c
@@ -871,7 +871,6 @@ xc_osdep_info_t xc_osdep_info = {
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
index d35e3ec..57f2717 100644
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -545,7 +545,6 @@ xc_osdep_info_t xc_osdep_info = {
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index 00cd0d8..405f93c 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -694,7 +694,6 @@ int xc_hvm_inject_trap(
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 9a831ce..3296cb1 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -414,7 +414,6 @@ xc_osdep_info_t xc_osdep_info = {
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xc_nomigrate.c
index fb6d53e..55204b9 100644
--- a/tools/libxc/xc_nomigrate.c
+++ b/tools/libxc/xc_nomigrate.c
@@ -48,7 +48,6 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_pagetab.c b/tools/libxc/xc_pagetab.c
index 8525967..2796a13 100644
--- a/tools/libxc/xc_pagetab.c
+++ b/tools/libxc/xc_pagetab.c
@@ -106,7 +106,6 @@ unsigned long xc_translate_foreign_address(xc_interface *xch, uint32_t dom,
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index 838fd21..1ca8b21 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -891,7 +891,6 @@ int xc_ffs64(uint64_t x)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index 7257a54..53c9225 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -343,7 +343,6 @@ xc_osdep_info_t xc_osdep_info = {
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c
index 61e1549..dc4b53f 100644
--- a/tools/libxc/xc_tmem.c
+++ b/tools/libxc/xc_tmem.c
@@ -523,7 +523,6 @@ int xc_tmem_restore_extra(xc_interface *xch, int dom, int io_fd)
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xenctrl_osdep_ENOSYS.c b/tools/libxc/xenctrl_osdep_ENOSYS.c
index 4821342..000e17e 100644
--- a/tools/libxc/xenctrl_osdep_ENOSYS.c
+++ b/tools/libxc/xenctrl_osdep_ENOSYS.c
@@ -200,7 +200,6 @@ xc_osdep_info_t xc_osdep_info = {
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
index e610a24..83729f0 100644
--- a/tools/libxc/xenctrlosdep.h
+++ b/tools/libxc/xenctrlosdep.h
@@ -166,7 +166,6 @@ void xc_osdep_log(xc_interface *xch, xentoollog_level level, int code, const cha
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
diff --git a/tools/libxc/xg_private.c b/tools/libxc/xg_private.c
index a914068..4c85ce7 100644
--- a/tools/libxc/xg_private.c
+++ b/tools/libxc/xg_private.c
@@ -203,7 +203,6 @@ __attribute__((weak))
  * mode: C
  * c-file-style: "BSD"
  * c-basic-offset: 4
- * tab-width: 4
  * indent-tabs-mode: nil
  * End:
  */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces
  2013-12-17 16:21 ` [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces Ian Jackson
@ 2013-12-17 16:44   ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2013-12-17 16:44 UTC (permalink / raw)
  To: Ian Jackson; +Cc: George Dunlap, xen-devel, Stefano Stabellini

On Tue, 2013-12-17 at 16:21 +0000, Ian Jackson wrote:
> Some of the files in libxc have hard tabs.  Many (but not all) of
> libxc's files have an emacs local variable section declaring tab-width
> to be 4.
> 
> Of the files which have both of these properties, some of the tabs are
> supposed to stand for 4 spaces and some of them 8.
> 
> Replace the ones where they are supposed to stand for 4 spaces with
> actual spaces.  After this patch the only hard tabs in libxc are ones
> which expect to expand to 8 spaces.  This will allow us to remove the
> tab-width settings.
> 
> I'm not fixing the 8-space tabs to avoid needless whitespace churn.

It's it a bit late for that after this patch? Given there is already
pain here I'd rather just rip the plaster off all at once...

> 
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>
> ---
>  tools/libxc/xc_compression.c    |    2 +-
>  tools/libxc/xc_domain_restore.c |    2 +-
>  tools/libxc/xc_gnttab.c         |   20 ++++++++++----------
>  tools/libxc/xc_linux_osdep.c    |    6 +++---
>  tools/libxc/xc_minios.c         |   22 +++++++++++-----------
>  tools/libxc/xc_netbsd.c         |   10 +++++-----
>  6 files changed, 31 insertions(+), 31 deletions(-)
> 
> diff --git a/tools/libxc/xc_compression.c b/tools/libxc/xc_compression.c
> index 8f0b89d..74c4c5d 100644
> --- a/tools/libxc/xc_compression.c
> +++ b/tools/libxc/xc_compression.c
> @@ -226,7 +226,7 @@ char *get_cache_page(comp_ctx *ctx, xen_pfn_t pfn,
>          ctx->pfn2cache[pfn] = item;
>      }
>          
> -    /* 	if requested item is in cache move to head of list */
> +    /* if requested item is in cache move to head of list */
>      if (item != ctx->page_list_head)
>      {
>          if (item == ctx->page_list_tail)
> diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
> index 80769a7..7ffa15d 100644
> --- a/tools/libxc/xc_domain_restore.c
> +++ b/tools/libxc/xc_domain_restore.c
> @@ -2200,7 +2200,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
>      /* clear any pending events and the selector */
>      MEMSET_ARRAY_FIELD(new_shared_info, evtchn_pending, 0);
>      for ( i = 0; i < XEN_LEGACY_MAX_VCPUS; i++ )
> -	    SET_FIELD(new_shared_info, vcpu_info[i].evtchn_pending_sel, 0);
> +        SET_FIELD(new_shared_info, vcpu_info[i].evtchn_pending_sel, 0);
>  
>      /* mask event channels */
>      MEMSET_ARRAY_FIELD(new_shared_info, evtchn_mask, 0xff);
> diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
> index 79dab40..f3c4b8e 100644
> --- a/tools/libxc/xc_gnttab.c
> +++ b/tools/libxc/xc_gnttab.c
> @@ -191,22 +191,22 @@ int xc_gnttab_munmap(xc_gnttab *xcg,
>                       void *start_address,
>                       uint32_t count)
>  {
> -	return xcg->ops->u.gnttab.munmap(xcg, xcg->ops_handle,
> -					 start_address, count);
> +    return xcg->ops->u.gnttab.munmap(xcg, xcg->ops_handle,
> +                                     start_address, count);
>  }
>  
>  int xc_gnttab_set_max_grants(xc_gnttab *xcg, uint32_t count)
>  {
> -	if (!xcg->ops->u.gnttab.set_max_grants)
> -		return 0;
> -	return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count);
> +    if (!xcg->ops->u.gnttab.set_max_grants)
> +        return 0;
> +    return xcg->ops->u.gnttab.set_max_grants(xcg, xcg->ops_handle, count);
>  }
>  
>  void *xc_gntshr_share_pages(xc_gntshr *xcg, uint32_t domid,
>                              int count, uint32_t *refs, int writable)
>  {
> -	return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle, domid,
> -	                                      count, refs, writable, -1, -1);
> +    return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle, domid,
> +                                          count, refs, writable, -1, -1);
>  }
>  
>  void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
> @@ -214,7 +214,7 @@ void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
>                                    uint32_t notify_offset,
>                                    evtchn_port_t notify_port)
>  {
> -	return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle,
> +    return xcg->ops->u.gntshr.share_pages(xcg, xcg->ops_handle,
>  			domid, 1, ref, writable, notify_offset, notify_port);
>  }
>  
> @@ -224,8 +224,8 @@ void *xc_gntshr_share_page_notify(xc_gntshr *xcg, uint32_t domid,
>   */
>  int xc_gntshr_munmap(xc_gntshr *xcg, void *start_address, uint32_t count)
>  {
> -	return xcg->ops->u.gntshr.munmap(xcg, xcg->ops_handle,
> -					 start_address, count);
> +    return xcg->ops->u.gntshr.munmap(xcg, xcg->ops_handle,
> +                                     start_address, count);
>  }
>  
> 
> diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
> index 73860a2..87c0936 100644
> --- a/tools/libxc/xc_linux_osdep.c
> +++ b/tools/libxc/xc_linux_osdep.c
> @@ -808,9 +808,9 @@ static void *linux_gntshr_share_pages(xc_gntshr *xch, xc_osdep_handle h,
>          err = ioctl(fd, IOCTL_GNTALLOC_SET_UNMAP_NOTIFY, &notify);
>      if (err) {
>          PERROR("linux_gntshr_share_page_notify: ioctl SET_UNMAP_NOTIFY failed");
> -		munmap(area, count * XC_PAGE_SIZE);
> -		area = NULL;
> -	}
> +        munmap(area, count * XC_PAGE_SIZE);
> +        area = NULL;
> +    }
>  
>      memcpy(refs, gref_info->gref_ids, count * sizeof(uint32_t));
>  
> diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
> index dec4d73..d35e3ec 100644
> --- a/tools/libxc/xc_minios.c
> +++ b/tools/libxc/xc_minios.c
> @@ -89,13 +89,13 @@ static int minios_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcm
>  
>      call.op = hypercall->op;
>      for (i = 0; i < sizeof(hypercall->arg) / sizeof(*hypercall->arg); i++)
> -	call.args[i] = hypercall->arg[i];
> +        call.args[i] = hypercall->arg[i];
>  
>      ret = HYPERVISOR_multicall(&call, 1);
>  
>      if (ret < 0) {
> -	errno = -ret;
> -	return -1;
> +        errno = -ret;
> +        return -1;
>      }
>      if ((long) call.result < 0) {
>          errno = - (long) call.result;
> @@ -110,9 +110,9 @@ static void *minios_privcmd_map_foreign_bulk(xc_interface *xch, xc_osdep_handle
>  {
>      unsigned long pt_prot = 0;
>      if (prot & PROT_READ)
> -	pt_prot = L1_PROT_RO;
> +        pt_prot = L1_PROT_RO;
>      if (prot & PROT_WRITE)
> -	pt_prot = L1_PROT;
> +        pt_prot = L1_PROT;
>      return map_frames_ex(arr, num, 1, 0, 1, dom, err, pt_prot);    
>  }
>  
> @@ -126,9 +126,9 @@ static void *minios_privcmd_map_foreign_batch(xc_interface *xch,  xc_osdep_handl
>      unsigned long addr;
>  
>      if (prot & PROT_READ)
> -	pt_prot = L1_PROT_RO;
> +        pt_prot = L1_PROT_RO;
>      if (prot & PROT_WRITE)
> -	pt_prot = L1_PROT;
> +        pt_prot = L1_PROT;
>  
>      addr = (unsigned long) map_frames_ex(arr, num, 1, 0, 1, dom, err, pt_prot);
>      for (i = 0; i < num; i++) {
> @@ -146,9 +146,9 @@ static void *minios_privcmd_map_foreign_range(xc_interface *xch, xc_osdep_handle
>      unsigned long pt_prot = 0;
>  
>      if (prot & PROT_READ)
> -	pt_prot = L1_PROT_RO;
> +        pt_prot = L1_PROT_RO;
>      if (prot & PROT_WRITE)
> -	pt_prot = L1_PROT;
> +        pt_prot = L1_PROT;
>  
>      assert(!(size % getpagesize()));
>      return map_frames_ex(&mfn, size / getpagesize(), 0, 1, 1, dom, NULL, pt_prot);
> @@ -165,9 +165,9 @@ static void *minios_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
>      void *ret;
>  
>      if (prot & PROT_READ)
> -	pt_prot = L1_PROT_RO;
> +        pt_prot = L1_PROT_RO;
>      if (prot & PROT_WRITE)
> -	pt_prot = L1_PROT;
> +        pt_prot = L1_PROT;
>  
>      mfns = malloc((size / XC_PAGE_SIZE) * sizeof(*mfns));
>  
> diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
> index 8a90ef3..9a831ce 100644
> --- a/tools/libxc/xc_netbsd.c
> +++ b/tools/libxc/xc_netbsd.c
> @@ -181,11 +181,11 @@ static void *netbsd_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
>  
>  	addr = mmap(NULL, size, prot, MAP_ANON | MAP_SHARED, -1, 0);
>  	if (addr == MAP_FAILED)
> -		goto mmap_failed;
> +            goto mmap_failed;
>  
>  	for (i = 0; i < nentries; i++) {
> -		entries[i].va = (uintptr_t)addr + (i * chunksize);
> -		entries[i].npages = chunksize >> XC_PAGE_SHIFT;
> +            entries[i].va = (uintptr_t)addr + (i * chunksize);
> +            entries[i].npages = chunksize >> XC_PAGE_SHIFT;
>  	}
>  
>  	ioctlx.num   = nentries;
> @@ -194,14 +194,14 @@ static void *netbsd_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handl
>  
>  	rc = ioctl(fd, IOCTL_PRIVCMD_MMAP, &ioctlx);
>  	if (rc)
> -		goto ioctl_failed;
> +            goto ioctl_failed;
>  
>  	return addr;
>  
>  ioctl_failed:
>  	rc = munmap(addr, size);
>  	if (rc == -1)
> -		ERROR("%s: error in error path\n", __FUNCTION__);
> +            ERROR("%s: error in error path\n", __FUNCTION__);
>  
>  mmap_failed:
>  	return NULL;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections
  2013-12-17 16:21 ` [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections Ian Jackson
@ 2013-12-17 16:47   ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2013-12-17 16:47 UTC (permalink / raw)
  To: Ian Jackson; +Cc: George Dunlap, xen-devel, Stefano Stabellini

On Tue, 2013-12-17 at 16:21 +0000, Ian Jackson wrote:
> Tabs must universally expand to 8 spaces.  All the (remaining) hard
> tabs in libxc expect this.  Attempting to define an alternative
> setting is simply wrong because not all tools (or indeed all emacsen)
> will respect it.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Ian Campbell <ian.campbell@citrix.com>

Lots of the hypervisor files have this similarly wrong :-( This patch is
right as far as it goes:

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  tools/libxc/xc_compression.c         |    1 -
>  tools/libxc/xc_core.c                |    1 -
>  tools/libxc/xc_core.h                |    1 -
>  tools/libxc/xc_core_arm.c            |    1 -
>  tools/libxc/xc_core_arm.h            |    1 -
>  tools/libxc/xc_core_x86.c            |    1 -
>  tools/libxc/xc_core_x86.h            |    1 -
>  tools/libxc/xc_dom.h                 |    1 -
>  tools/libxc/xc_dom_arm.c             |    1 -
>  tools/libxc/xc_dom_armzimageloader.c |    1 -
>  tools/libxc/xc_dom_binloader.c       |    1 -
>  tools/libxc/xc_dom_boot.c            |    1 -
>  tools/libxc/xc_dom_bzimageloader.c   |    1 -
>  tools/libxc/xc_dom_compat_linux.c    |    1 -
>  tools/libxc/xc_dom_core.c            |    1 -
>  tools/libxc/xc_dom_elfloader.c       |    1 -
>  tools/libxc/xc_dom_x86.c             |    1 -
>  tools/libxc/xc_domain.c              |    1 -
>  tools/libxc/xc_domain_restore.c      |    1 -
>  tools/libxc/xc_domain_save.c         |    1 -
>  tools/libxc/xc_evtchn.c              |    1 -
>  tools/libxc/xc_flask.c               |    1 -
>  tools/libxc/xc_foreign_memory.c      |    1 -
>  tools/libxc/xc_gnttab.c              |    1 -
>  tools/libxc/xc_hcall_buf.c           |    1 -
>  tools/libxc/xc_hvm_build_arm.c       |    1 -
>  tools/libxc/xc_hvm_build_x86.c       |    1 -
>  tools/libxc/xc_linux.c               |    1 -
>  tools/libxc/xc_linux_osdep.c         |    1 -
>  tools/libxc/xc_minios.c              |    1 -
>  tools/libxc/xc_misc.c                |    1 -
>  tools/libxc/xc_netbsd.c              |    1 -
>  tools/libxc/xc_nomigrate.c           |    1 -
>  tools/libxc/xc_pagetab.c             |    1 -
>  tools/libxc/xc_private.c             |    1 -
>  tools/libxc/xc_solaris.c             |    1 -
>  tools/libxc/xc_tmem.c                |    1 -
>  tools/libxc/xenctrl_osdep_ENOSYS.c   |    1 -
>  tools/libxc/xenctrlosdep.h           |    1 -
>  tools/libxc/xg_private.c             |    1 -
>  40 files changed, 40 deletions(-)
> 
> diff --git a/tools/libxc/xc_compression.c b/tools/libxc/xc_compression.c
> index 74c4c5d..50db0f5 100644
> --- a/tools/libxc/xc_compression.c
> +++ b/tools/libxc/xc_compression.c
> @@ -541,7 +541,6 @@ error:
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
> index 4bc1abb..cea97cd 100644
> --- a/tools/libxc/xc_core.c
> +++ b/tools/libxc/xc_core.c
> @@ -974,7 +974,6 @@ xc_domain_dumpcore(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core.h b/tools/libxc/xc_core.h
> index 10cbfca..4314fbe 100644
> --- a/tools/libxc/xc_core.h
> +++ b/tools/libxc/xc_core.h
> @@ -168,7 +168,6 @@ int xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core_arm.c b/tools/libxc/xc_core_arm.c
> index 2fbcf3f..e3c4212 100644
> --- a/tools/libxc/xc_core_arm.c
> +++ b/tools/libxc/xc_core_arm.c
> @@ -101,7 +101,6 @@ xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width, xc_do
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core_arm.h b/tools/libxc/xc_core_arm.h
> index 24781eb..d4c110c 100644
> --- a/tools/libxc/xc_core_arm.h
> +++ b/tools/libxc/xc_core_arm.h
> @@ -54,7 +54,6 @@ xc_core_arch_context_get_shdr(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c
> index e328dcf..6208849 100644
> --- a/tools/libxc/xc_core_x86.c
> +++ b/tools/libxc/xc_core_x86.c
> @@ -214,7 +214,6 @@ xc_core_arch_map_p2m_writable(xc_interface *xch, unsigned int guest_width, xc_do
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_core_x86.h b/tools/libxc/xc_core_x86.h
> index d5e04e7..334cd7d 100644
> --- a/tools/libxc/xc_core_x86.h
> +++ b/tools/libxc/xc_core_x86.h
> @@ -55,7 +55,6 @@ xc_core_arch_context_get_shdr(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h
> index 7099cee..763433b 100644
> --- a/tools/libxc/xc_dom.h
> +++ b/tools/libxc/xc_dom.h
> @@ -375,7 +375,6 @@ int arch_setup_bootlate(struct xc_dom_image *dom);
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
> index a40e04d..17dd5c1 100644
> --- a/tools/libxc/xc_dom_arm.c
> +++ b/tools/libxc/xc_dom_arm.c
> @@ -326,7 +326,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c
> index e6516a1..26ba731 100644
> --- a/tools/libxc/xc_dom_armzimageloader.c
> +++ b/tools/libxc/xc_dom_armzimageloader.c
> @@ -258,7 +258,6 @@ static void __init register_loader(void)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_binloader.c b/tools/libxc/xc_dom_binloader.c
> index e1de5b5..c2e7dfb 100644
> --- a/tools/libxc/xc_dom_binloader.c
> +++ b/tools/libxc/xc_dom_binloader.c
> @@ -324,7 +324,6 @@ static void __init register_loader(void)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xc_dom_boot.c
> index fdfeaf8..915467d 100644
> --- a/tools/libxc/xc_dom_boot.c
> +++ b/tools/libxc/xc_dom_boot.c
> @@ -436,7 +436,6 @@ int xc_dom_gnttab_init(struct xc_dom_image *dom)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_bzimageloader.c b/tools/libxc/xc_dom_bzimageloader.c
> index 2225699..a948909 100644
> --- a/tools/libxc/xc_dom_bzimageloader.c
> +++ b/tools/libxc/xc_dom_bzimageloader.c
> @@ -781,7 +781,6 @@ static void __init register_loader(void)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_compat_linux.c b/tools/libxc/xc_dom_compat_linux.c
> index 2c14a0f..c295fd2 100644
> --- a/tools/libxc/xc_dom_compat_linux.c
> +++ b/tools/libxc/xc_dom_compat_linux.c
> @@ -192,7 +192,6 @@ int xc_dom_linux_build(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
> index 77a4e64..6555caa 100644
> --- a/tools/libxc/xc_dom_core.c
> +++ b/tools/libxc/xc_dom_core.c
> @@ -1028,7 +1028,6 @@ int xc_dom_build_image(struct xc_dom_image *dom)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c
> index 9843b1f..beb0bb9 100644
> --- a/tools/libxc/xc_dom_elfloader.c
> +++ b/tools/libxc/xc_dom_elfloader.c
> @@ -428,7 +428,6 @@ static void __init register_loader(void)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c
> index e034d62..3e5f789 100644
> --- a/tools/libxc/xc_dom_x86.c
> +++ b/tools/libxc/xc_dom_x86.c
> @@ -955,7 +955,6 @@ int xc_dom_feature_translated(struct xc_dom_image *dom)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index 1ccafc5..484df77 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -1781,7 +1781,6 @@ int xc_domain_set_max_evtchn(xc_interface *xch, uint32_t domid,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
> index 7ffa15d..717d370 100644
> --- a/tools/libxc/xc_domain_restore.c
> +++ b/tools/libxc/xc_domain_restore.c
> @@ -2363,7 +2363,6 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
> index 42c4752..0fa0a26 100644
> --- a/tools/libxc/xc_domain_save.c
> +++ b/tools/libxc/xc_domain_save.c
> @@ -2140,7 +2140,6 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
> index 2e0679e..4aed746 100644
> --- a/tools/libxc/xc_evtchn.c
> +++ b/tools/libxc/xc_evtchn.c
> @@ -128,7 +128,6 @@ int xc_evtchn_unmask(xc_evtchn *xce, evtchn_port_t port)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_flask.c b/tools/libxc/xc_flask.c
> index 4294a25..8e99c9a 100644
> --- a/tools/libxc/xc_flask.c
> +++ b/tools/libxc/xc_flask.c
> @@ -437,7 +437,6 @@ int xc_flask_relabel_domain(xc_interface *xch, int domid, uint32_t sid)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_foreign_memory.c b/tools/libxc/xc_foreign_memory.c
> index 7dfc817..9a6c6f5 100644
> --- a/tools/libxc/xc_foreign_memory.c
> +++ b/tools/libxc/xc_foreign_memory.c
> @@ -126,7 +126,6 @@ void *xc_map_foreign_bulk_compat(xc_interface *xch, xc_osdep_handle h,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_gnttab.c b/tools/libxc/xc_gnttab.c
> index f3c4b8e..500ce59 100644
> --- a/tools/libxc/xc_gnttab.c
> +++ b/tools/libxc/xc_gnttab.c
> @@ -234,7 +234,6 @@ int xc_gntshr_munmap(xc_gntshr *xcg, void *start_address, uint32_t count)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_hcall_buf.c b/tools/libxc/xc_hcall_buf.c
> index e762a93..f9d4e31 100644
> --- a/tools/libxc/xc_hcall_buf.c
> +++ b/tools/libxc/xc_hcall_buf.c
> @@ -306,7 +306,6 @@ void xc_hypercall_buffer_array_destroy(xc_interface *xc,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_hvm_build_arm.c b/tools/libxc/xc_hvm_build_arm.c
> index ff66689..a484373 100644
> --- a/tools/libxc/xc_hvm_build_arm.c
> +++ b/tools/libxc/xc_hvm_build_arm.c
> @@ -43,7 +43,6 @@ int xc_hvm_build_target_mem(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c
> index 77bd365..16374fe 100644
> --- a/tools/libxc/xc_hvm_build_x86.c
> +++ b/tools/libxc/xc_hvm_build_x86.c
> @@ -608,7 +608,6 @@ int xc_hvm_build_target_mem(xc_interface *xch,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_linux.c b/tools/libxc/xc_linux.c
> index 6121d80..686d8b7 100644
> --- a/tools/libxc/xc_linux.c
> +++ b/tools/libxc/xc_linux.c
> @@ -72,7 +72,6 @@ void *xc_memalign(xc_interface *xch, size_t alignment, size_t size)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
> index 87c0936..cc6bb8f 100644
> --- a/tools/libxc/xc_linux_osdep.c
> +++ b/tools/libxc/xc_linux_osdep.c
> @@ -871,7 +871,6 @@ xc_osdep_info_t xc_osdep_info = {
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
> index d35e3ec..57f2717 100644
> --- a/tools/libxc/xc_minios.c
> +++ b/tools/libxc/xc_minios.c
> @@ -545,7 +545,6 @@ xc_osdep_info_t xc_osdep_info = {
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
> index 00cd0d8..405f93c 100644
> --- a/tools/libxc/xc_misc.c
> +++ b/tools/libxc/xc_misc.c
> @@ -694,7 +694,6 @@ int xc_hvm_inject_trap(
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
> index 9a831ce..3296cb1 100644
> --- a/tools/libxc/xc_netbsd.c
> +++ b/tools/libxc/xc_netbsd.c
> @@ -414,7 +414,6 @@ xc_osdep_info_t xc_osdep_info = {
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xc_nomigrate.c
> index fb6d53e..55204b9 100644
> --- a/tools/libxc/xc_nomigrate.c
> +++ b/tools/libxc/xc_nomigrate.c
> @@ -48,7 +48,6 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_pagetab.c b/tools/libxc/xc_pagetab.c
> index 8525967..2796a13 100644
> --- a/tools/libxc/xc_pagetab.c
> +++ b/tools/libxc/xc_pagetab.c
> @@ -106,7 +106,6 @@ unsigned long xc_translate_foreign_address(xc_interface *xch, uint32_t dom,
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
> index 838fd21..1ca8b21 100644
> --- a/tools/libxc/xc_private.c
> +++ b/tools/libxc/xc_private.c
> @@ -891,7 +891,6 @@ int xc_ffs64(uint64_t x)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
> index 7257a54..53c9225 100644
> --- a/tools/libxc/xc_solaris.c
> +++ b/tools/libxc/xc_solaris.c
> @@ -343,7 +343,6 @@ xc_osdep_info_t xc_osdep_info = {
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c
> index 61e1549..dc4b53f 100644
> --- a/tools/libxc/xc_tmem.c
> +++ b/tools/libxc/xc_tmem.c
> @@ -523,7 +523,6 @@ int xc_tmem_restore_extra(xc_interface *xch, int dom, int io_fd)
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xenctrl_osdep_ENOSYS.c b/tools/libxc/xenctrl_osdep_ENOSYS.c
> index 4821342..000e17e 100644
> --- a/tools/libxc/xenctrl_osdep_ENOSYS.c
> +++ b/tools/libxc/xenctrl_osdep_ENOSYS.c
> @@ -200,7 +200,6 @@ xc_osdep_info_t xc_osdep_info = {
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
> index e610a24..83729f0 100644
> --- a/tools/libxc/xenctrlosdep.h
> +++ b/tools/libxc/xenctrlosdep.h
> @@ -166,7 +166,6 @@ void xc_osdep_log(xc_interface *xch, xentoollog_level level, int code, const cha
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */
> diff --git a/tools/libxc/xg_private.c b/tools/libxc/xg_private.c
> index a914068..4c85ce7 100644
> --- a/tools/libxc/xg_private.c
> +++ b/tools/libxc/xg_private.c
> @@ -203,7 +203,6 @@ __attribute__((weak))
>   * mode: C
>   * c-file-style: "BSD"
>   * c-basic-offset: 4
> - * tab-width: 4
>   * indent-tabs-mode: nil
>   * End:
>   */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* git-filter-branch automatic CC adding script
  2013-12-17 16:21 [PATCH 0/2] libxc: Fix some whitespace/tab-width problems Ian Jackson
  2013-12-17 16:21 ` [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces Ian Jackson
  2013-12-17 16:21 ` [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections Ian Jackson
@ 2013-12-18 11:53 ` Ian Jackson
  2 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2013-12-18 11:53 UTC (permalink / raw)
  To: xen-devel

Ian Jackson writes ("[PATCH 0/2] libxc: Fix some whitespace/tab-width problems"):
> I have here two interrelated whitespace formatting fixes for libxc:
> 
>  1/2 libxc: Remove hard tabs which ought to be 4 spaces
>  2/2 libxc: Remove "tab-width: 8" from emacs local variables

FYI I used the script below to add some missing CCs to this and my
other series.

#!/usr/bin/perl -w
#
# usage
#   git-filter-branch --msg-filter \
#        ".../auto-cc-maintainers `pwd`/xen.git xen-devel@lists.xen.org"
#
# (args are things never to add to CCs)

use strict;
use IO::File;

die unless @ARGV;
die if $ARGV[0] =~ m/^-/;

our %got;

my $xendir = shift @ARGV;
chdir $xendir or die "$xendir: $!";

$got{lc $_}++ foreach @ARGV;

while (<STDIN>) {
    print or die $!;
    $got{lc $1}++ if m/^[-0-9a-z]+: (.*)$/i;
}        

my $anyyet=0;

open CCS, "git-show $ENV{GIT_COMMIT} | scripts/get_maintainer.pl |" or die $!;
while (<CCS>) {
    chomp;
    next if $got{lc $_};
    print STDERR "\n" if !$anyyet++;
    print STDERR "$ENV{GIT_COMMIT} ADDING $_\n";
    print "CC: $_\n" or die $!;
}
$!=0; $?=0; close CCS or die "$? $!";

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-18 11:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 16:21 [PATCH 0/2] libxc: Fix some whitespace/tab-width problems Ian Jackson
2013-12-17 16:21 ` [PATCH 1/2] libxc: Remove hard tabs which ought to be 4 spaces Ian Jackson
2013-12-17 16:44   ` Ian Campbell
2013-12-17 16:21 ` [PATCH 2/2] libxc: Remove "tab-width: 8" from emacs local variables sections Ian Jackson
2013-12-17 16:47   ` Ian Campbell
2013-12-18 11:53 ` git-filter-branch automatic CC adding script Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).