Skip to contentSkip to conversation

Janitor whitespace in pSeries_pci.c

PATCH In review Linas Vepstas 4 participants 9 messages Sep 20, 2004 – Sep 25, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Janitor whitespace in pSeries_pci.c

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

#1 lore raw

Forgot to attach the actual patch.

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

Quoted 1 line

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

===== pSeries_pci.c 1.44 vs edited =====

pSeries_pci.c renamed from arch/ppc64/kernel/pSeries_pci.c +39 -39
@@ -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;
 }
#2 lore raw
Quoted 9 lines · Linas Vepstas

Forgot to attach the actual patch.

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

Quoted 1 line

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

#3 lore raw

On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:

Quoted 11 lines · Linas Vepstas
Quoted 9 lines

Forgot to attach the actual patch.

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

Quoted 1 line

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.

Quoted 7 lines

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

#4 lore raw
Quoted 20 lines · Linas Vepstas

On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:

Quoted 11 lines · Linas Vepstas
Quoted 9 lines

Forgot to attach the actual patch.

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

Quoted 1 line

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.

Quoted 7 lines

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.

Quoted 5 lines

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

Quoted 7 lines

--linas

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

#5 lore raw

On Thu, Sep 23, 2004 at 01:17:00AM +0200, Herbert Poetzl was heard to remark:

Quoted 27 lines · Linas Vepstas
Quoted 20 lines

On Tue, Sep 21, 2004 at 02:07:09PM +0300, Denis Vlasenko was heard to remark:

Quoted 11 lines · Linas Vepstas
Quoted 9 lines

Forgot to attach the actual patch.

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

Quoted 1 line

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.

Quoted 7 lines

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.

Quoted 5 lines

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.

Quoted 6 lines

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

#6 lore raw
In reply to Herbert Poetzl
Quoted 3 lines · Herbert Poetzl

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.

#7 lore raw
Quoted 10 lines · Paul Mackerras
Quoted 3 lines · Herbert Poetzl

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

Quoted 6 lines

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

#8 lore raw
Quoted 7 lines · Herbert Poetzl
Quoted 6 lines · Paul Mackerras
Quoted 3 lines · Herbert Poetzl

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

Quoted 8 lines
Quoted 4 lines

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