All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
@ 2004-09-20 22:19 Linas Vepstas
  2004-09-20 22:31 ` Linas Vepstas
  0 siblings, 1 reply; 9+ messages in thread
From: Linas Vepstas @ 2004-09-20 22:19 UTC (permalink / raw)
  To: linuxppc64-dev; +Cc: linux-kernel, paulus, anton

Hi,


This file mixes tabs with 8 spaces, leading to poor display 
if one's editor doesn't have tab-stops set to 8.   Please apply.

--linas

Signed-off-by: Linas Vepstas <linas@linas.org>

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-20 22:19 [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c Linas Vepstas
@ 2004-09-20 22:31 ` Linas Vepstas
  2004-09-21 11:07   ` Denis Vlasenko
  0 siblings, 1 reply; 9+ messages in thread
From: Linas Vepstas @ 2004-09-20 22:31 UTC (permalink / raw)
  To: linuxppc64-dev; +Cc: paulus, linux-kernel, anton

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]



Forgot to attach the actual patch.

On Mon, Sep 20, 2004 at 05:19:33PM -0500, Linas Vepstas was heard to remark:
> Hi,


This file mixes tabs with 8 spaces, leading to poor display 
if one's editor doesn't have tab-stops set to 8.   Please apply.

--linas

Signed-off-by: Linas Vepstas <linas@linas.org>


[-- Attachment #2: pseries-pci-whitespace.patch --]
[-- Type: text/plain, Size: 4218 bytes --]

===== pSeries_pci.c 1.44 vs edited =====
--- 1.44/arch/ppc64/kernel/pSeries_pci.c	Mon Sep 13 19:23:15 2004
+++ edited/pSeries_pci.c	Mon Sep 20 17:08:48 2004
@@ -170,7 +170,7 @@
 	u8 intpin;
 	struct device_node *node;
 
-    	pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin);
+	pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin);
 
 	if (intpin == 0) {
 		PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Interrupt used by device.\n", pci_name(pci_dev));
@@ -206,8 +206,8 @@
 #define ISA_SPACE_IO 0x1
 
 static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
-		                      unsigned long phb_io_base_phys,
-				      void * phb_io_base_virt)
+                                      unsigned long phb_io_base_phys,
+                                      void * phb_io_base_virt)
 {
 	struct isa_range *range;
 	unsigned long pci_addr;
@@ -304,8 +304,8 @@
 						hose->io_base_phys,
 						hose->io_base_virt);
 					of_node_put(isa_dn);
-                                        /* Allow all IO */
-                                        io_page_mask = -1;
+					/* Allow all IO */
+					io_page_mask = -1;
 				}
 			}
 
@@ -466,7 +466,7 @@
 	}
 
 	of_prop = (struct property *)alloc_bootmem(sizeof(struct property) +
-			sizeof(phb->global_number));        
+			sizeof(phb->global_number));
 
 	if (!of_prop) {
 		kfree(phb);
@@ -571,30 +571,30 @@
 	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
 		if (dev->resource[i].flags & IORESOURCE_IO) {
 			unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
-                        unsigned long start, end, mask;
+			unsigned long start, end, mask;
 
-                        start = dev->resource[i].start += offset;
-                        end = dev->resource[i].end += offset;
+			start = dev->resource[i].start += offset;
+			end = dev->resource[i].end += offset;
 
-                        /* Need to allow IO access to pages that are in the
-                           ISA range */
-                        if (start < MAX_ISA_PORT) {
-                                if (end > MAX_ISA_PORT)
-                                        end = MAX_ISA_PORT;
-
-                                start >>= PAGE_SHIFT;
-                                end >>= PAGE_SHIFT;
-
-                                /* get the range of pages for the map */
-                                mask = ((1 << (end+1))-1) ^ ((1 << start)-1);
-                                io_page_mask |= mask;
-                        }
+			/* Need to allow IO access to pages that are in the
+			   ISA range */
+			if (start < MAX_ISA_PORT) {
+				if (end > MAX_ISA_PORT)
+					end = MAX_ISA_PORT;
+
+				start >>= PAGE_SHIFT;
+				end >>= PAGE_SHIFT;
+
+				/* get the range of pages for the map */
+				mask = ((1 << (end+1))-1) ^ ((1 << start)-1);
+				io_page_mask |= mask;
+			}
 		}
-                else if (dev->resource[i].flags & IORESOURCE_MEM) {
+		else if (dev->resource[i].flags & IORESOURCE_MEM) {
 			dev->resource[i].start += hose->pci_mem_offset;
 			dev->resource[i].end += hose->pci_mem_offset;
 		}
-        }
+	}
 }
 EXPORT_SYMBOL(pcibios_fixup_device_resources);
 
@@ -796,21 +796,21 @@
 int
 pcibios_scan_all_fns(struct pci_bus *bus, int devfn)
 {
-       struct device_node *busdn, *dn;
+	struct device_node *busdn, *dn;
+
+	if (bus->self)
+		busdn = pci_device_to_OF_node(bus->self);
+	else
+		busdn = bus->sysdata;   /* must be a phb */
 
-       if (bus->self)
-               busdn = pci_device_to_OF_node(bus->self);
-       else
-               busdn = bus->sysdata;   /* must be a phb */
-
-       /*
-        * Check to see if there is any of the 8 functions are in the
-        * device tree.  If they are then we need to scan all the
-        * functions of this slot.
-        */
-       for (dn = busdn->child; dn; dn = dn->sibling)
-               if ((dn->devfn >> 3) == (devfn >> 3))
-                       return 1;
+	/*
+	* Check to see if there is any of the 8 functions are in the
+	* device tree.  If they are then we need to scan all the
+	* functions of this slot.
+	*/
+	for (dn = busdn->child; dn; dn = dn->sibling)
+		if ((dn->devfn >> 3) == (devfn >> 3))
+			return 1;
 
-       return 0;
+	return 0;
 }

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-20 22:31 ` Linas Vepstas
@ 2004-09-21 11:07   ` Denis Vlasenko
  2004-09-21 16:12     ` Linas Vepstas
  0 siblings, 1 reply; 9+ messages in thread
From: Denis Vlasenko @ 2004-09-21 11:07 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: paulus, linux-kernel, anton

On Tuesday 21 September 2004 01:31, Linas Vepstas wrote:
> 
> Forgot to attach the actual patch.
> 
> On Mon, Sep 20, 2004 at 05:19:33PM -0500, Linas Vepstas was heard to remark:
> > Hi,
> 
> 
> This file mixes tabs with 8 spaces, leading to poor display 
> if one's editor doesn't have tab-stops set to 8.   Please apply.

There are lots of such places.
Automated scripts can easily produce megabytes worth of whitespace
patches.

As I understand, such patches aren't accepted because
merging pain is much greater than gain.
Typically whitespace cleanups are piggybacked on some code changes.
--
vda


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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-21 11:07   ` Denis Vlasenko
@ 2004-09-21 16:12     ` Linas Vepstas
  2004-09-22 23:17       ` Herbert Poetzl
  0 siblings, 1 reply; 9+ messages in thread
From: Linas Vepstas @ 2004-09-21 16:12 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: paulus, linux-kernel, anton

On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:
> On Tuesday 21 September 2004 01:31, Linas Vepstas wrote:
> > 
> > Forgot to attach the actual patch.
> > 
> > On Mon, Sep 20, 2004 at 05:19:33PM -0500, Linas Vepstas was heard to remark:
> > > Hi,
> > 
> > 
> > This file mixes tabs with 8 spaces, leading to poor display 
> > if one's editor doesn't have tab-stops set to 8.   Please apply.
> 
> There are lots of such places.
> Automated scripts can easily produce megabytes worth of whitespace
> patches.
> 
> As I understand, such patches aren't accepted because
> merging pain is much greater than gain.
> Typically whitespace cleanups are piggybacked on some code changes.

Last time I sent in a combined whitespace plus other-fixes patch, 
I was asked to do the opposite, and split them apart.  I'm just
trying to do the right thing; I have other pending patches for this 
file, and I'm waiting for the backlog to clear out before I submit
those.

--linas


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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-21 16:12     ` Linas Vepstas
@ 2004-09-22 23:17       ` Herbert Poetzl
  2004-09-23  0:29         ` Linas Vepstas
  2004-09-23 15:36         ` Paul Mackerras
  0 siblings, 2 replies; 9+ messages in thread
From: Herbert Poetzl @ 2004-09-22 23:17 UTC (permalink / raw)
  To: Linas Vepstas; +Cc: Denis Vlasenko, paulus, linux-kernel, anton, Andrew Morton

On Tue, Sep 21, 2004 at 11:12:16AM -0500, Linas Vepstas wrote:
> On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:
> > On Tuesday 21 September 2004 01:31, Linas Vepstas wrote:
> > > 
> > > Forgot to attach the actual patch.
> > > 
> > > On Mon, Sep 20, 2004 at 05:19:33PM -0500, Linas Vepstas was heard to remark:
> > > > Hi,
> > > 
> > > 
> > > This file mixes tabs with 8 spaces, leading to poor display 
> > > if one's editor doesn't have tab-stops set to 8.   Please apply.
> > 
> > There are lots of such places.
> > Automated scripts can easily produce megabytes worth of whitespace
> > patches.
> > 
> > As I understand, such patches aren't accepted because
> > merging pain is much greater than gain.
> > Typically whitespace cleanups are piggybacked on some code changes.
> 
> Last time I sent in a combined whitespace plus other-fixes patch, 
> I was asked to do the opposite, and split them apart.  I'm just
> trying to do the right thing; I have other pending patches for this 
> file, and I'm waiting for the backlog to clear out before I submit
> those.

well, I'd like to know if full whitespace cleanup
(trailing and indentation) _is_ something which
is interesting for linux mainline ...

because if so, I probably could provide a bunch of
patches too ... 

TIA,
Herbert

> --linas
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-22 23:17       ` Herbert Poetzl
@ 2004-09-23  0:29         ` Linas Vepstas
  2004-09-23 15:36         ` Paul Mackerras
  1 sibling, 0 replies; 9+ messages in thread
From: Linas Vepstas @ 2004-09-23  0:29 UTC (permalink / raw)
  To: Denis Vlasenko, paulus, linux-kernel, anton, Andrew Morton

On Thu, Sep 23, 2004 at 01:17:00AM +0200, Herbert Poetzl was heard to remark:
> On Tue, Sep 21, 2004 at 11:12:16AM -0500, Linas Vepstas wrote:
> > On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:
> > > On Tuesday 21 September 2004 01:31, Linas Vepstas wrote:
> > > > 
> > > > Forgot to attach the actual patch.
> > > > 
> > > > On Mon, Sep 20, 2004 at 05:19:33PM -0500, Linas Vepstas was heard to remark:
> > > > > Hi,
> > > > 
> > > > 
> > > > This file mixes tabs with 8 spaces, leading to poor display 
> > > > if one's editor doesn't have tab-stops set to 8.   Please apply.
> > > 
> > > There are lots of such places.
> > > Automated scripts can easily produce megabytes worth of whitespace
> > > patches.
> > > 
> > > As I understand, such patches aren't accepted because
> > > merging pain is much greater than gain.
> > > Typically whitespace cleanups are piggybacked on some code changes.
> > 
> > Last time I sent in a combined whitespace plus other-fixes patch, 
> > I was asked to do the opposite, and split them apart.  I'm just
> > trying to do the right thing; I have other pending patches for this 
> > file, and I'm waiting for the backlog to clear out before I submit
> > those.
> 
> well, I'd like to know if full whitespace cleanup
> (trailing and indentation) _is_ something which
> is interesting for linux mainline ...
> 
> because if so, I probably could provide a bunch of
> patches too ... 

Hey, don't wreck it for me; I want this applied because I actually 
read this file every couple of days.  No need to clean up any files 
that *I* don't read...

--linas

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-22 23:17       ` Herbert Poetzl
  2004-09-23  0:29         ` Linas Vepstas
@ 2004-09-23 15:36         ` Paul Mackerras
  2004-09-23 16:08           ` Herbert Poetzl
  1 sibling, 1 reply; 9+ messages in thread
From: Paul Mackerras @ 2004-09-23 15:36 UTC (permalink / raw)
  To: Herbert Poetzl
  Cc: Linas Vepstas, Denis Vlasenko, linux-kernel, anton, Andrew Morton

Herbert Poetzl writes:

> well, I'd like to know if full whitespace cleanup
> (trailing and indentation) _is_ something which
> is interesting for linux mainline ...

It's like this... you get to clean up the white space in a file (if
you want) IF you are also doing some useful work on the file - but the
whitespace cleanup and the useful work need to be separate patches in
order to ease later tracking of what changed.

Paul.

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-23 15:36         ` Paul Mackerras
@ 2004-09-23 16:08           ` Herbert Poetzl
  2004-09-25 16:55             ` Denis Vlasenko
  0 siblings, 1 reply; 9+ messages in thread
From: Herbert Poetzl @ 2004-09-23 16:08 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Linas Vepstas, Denis Vlasenko, linux-kernel, anton, Andrew Morton

On Thu, Sep 23, 2004 at 08:36:46AM -0700, Paul Mackerras wrote:
> Herbert Poetzl writes:
> 
> > well, I'd like to know if full whitespace cleanup
> > (trailing and indentation) _is_ something which
> > is interesting for linux mainline ...
> 
> It's like this... you get to clean up the white space in a file (if
> you want) IF you are also doing some useful work on the file - but the
> whitespace cleanup and the useful work need to be separate patches in
> order to ease later tracking of what changed.

ah, okay, so a larger patch cleaning up the
whitespace issues in let's say linux/kernel or
linux/fs would not be appreciated ...

thanks for the info,
Herbert

> Paul.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c
  2004-09-23 16:08           ` Herbert Poetzl
@ 2004-09-25 16:55             ` Denis Vlasenko
  0 siblings, 0 replies; 9+ messages in thread
From: Denis Vlasenko @ 2004-09-25 16:55 UTC (permalink / raw)
  To: Herbert Poetzl, Paul Mackerras
  Cc: Linas Vepstas, linux-kernel, anton, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

On Thursday 23 September 2004 19:08, Herbert Poetzl wrote:
> On Thu, Sep 23, 2004 at 08:36:46AM -0700, Paul Mackerras wrote:
> > Herbert Poetzl writes:
> > 
> > > well, I'd like to know if full whitespace cleanup
> > > (trailing and indentation) _is_ something which
> > > is interesting for linux mainline ...
> > 
> > It's like this... you get to clean up the white space in a file (if
> > you want) IF you are also doing some useful work on the file - but the
> > whitespace cleanup and the useful work need to be separate patches in
> > order to ease later tracking of what changed.
> 
> ah, okay, so a larger patch cleaning up the
> whitespace issues in let's say linux/kernel or
> linux/fs would not be appreciated ...

Just in case, this is the script which can be used to generate patches
to fix whitespace in the tree. Unmodified script fixes only trailing ws
in printks and therefore ~250 generated patches have some chance of
acceptance.

Script has commented out code to fix all kinds of ws misuse.
If enabled, it produces nearly 50 MB worth of patches.
--
vda

[-- Attachment #2: source_ws_autopatcher.sh --]
[-- Type: application/x-shellscript, Size: 2801 bytes --]

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

end of thread, other threads:[~2004-09-25 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-20 22:19 [PATCH] [PPC64] [TRIVIAL] Janitor whitespace in pSeries_pci.c Linas Vepstas
2004-09-20 22:31 ` Linas Vepstas
2004-09-21 11:07   ` Denis Vlasenko
2004-09-21 16:12     ` Linas Vepstas
2004-09-22 23:17       ` Herbert Poetzl
2004-09-23  0:29         ` Linas Vepstas
2004-09-23 15:36         ` Paul Mackerras
2004-09-23 16:08           ` Herbert Poetzl
2004-09-25 16:55             ` Denis Vlasenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.