diff mbox

i2c-i801: Fix the alignment of the device table

Message ID 20140623103658.57df2c14@endymion.delvare
State Superseded
Headers show

Commit Message

Jean Delvare June 23, 2014, 8:36 a.m. UTC
A long name broke the alignment, shift the columns a bit to fix it and
make the table look nice again. While we're here, switch to the
standard comment style to make checkpatch happy.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: James Ralston <james.d.ralston@intel.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-i801.c |  102 +++++++++++++++++++++---------------------
 1 file changed, 51 insertions(+), 51 deletions(-)

Comments

Wolfram Sang July 16, 2014, 5:23 p.m. UTC | #1
On Mon, Jun 23, 2014 at 10:36:58AM +0200, Jean Delvare wrote:
> A long name broke the alignment, shift the columns a bit to fix it and
> make the table look nice again. While we're here, switch to the
> standard comment style to make checkpatch happy.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: James Ralston <james.d.ralston@intel.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>

Hmmm, what about giving the names even more space so we have some buffer for the
future? And what about replacing spaces with tabs?
Jean Delvare July 17, 2014, 6:29 a.m. UTC | #2
Hi Wolfram,

On Wed, 16 Jul 2014 19:23:09 +0200, Wolfram Sang wrote:
> On Mon, Jun 23, 2014 at 10:36:58AM +0200, Jean Delvare wrote:
> > A long name broke the alignment, shift the columns a bit to fix it and
> > make the table look nice again. While we're here, switch to the
> > standard comment style to make checkpatch happy.
> > 
> > Signed-off-by: Jean Delvare <jdelvare@suse.de>
> > Cc: James Ralston <james.d.ralston@intel.com>
> > Cc: Wolfram Sang <wsa@the-dreams.de>
> 
> Hmmm, what about giving the names even more space so we have some buffer for the
> future? And what about replacing spaces with tabs?

I considered it, but could not make up my mind.

The table already spans to column 74. This does not leave that much
room for growing (table) columns. I am not sure if we would rather use
the remaining space to have some margin for the name column, as you
suggest, or keep it as spare space for an extra column if future
chipsets ever implement a new feature.

Currently, columns are aligned on 3, 27, 36, 44, 52, 60 and 68. None of
these values are multiple of 8, so the use of tabs would not help much,
unless we shift everything first.

One possibility is to switch to tabs and shift all columns (but the
first) by 4 to the right. This rules out the addition of a column in
the future, but otherwise fulfills your desire.

To be honest, I don't really care. All I wanted is that columns are
properly aligned. If the plan above makes you happier then fine with
me, I'll do that.
Wolfram Sang July 17, 2014, 8:41 a.m. UTC | #3
> One possibility is to switch to tabs and shift all columns (but the
> first) by 4 to the right. This rules out the addition of a column in
> the future, but otherwise fulfills your desire.

I'd like that. Plus, I am not so strict with the 80 char limit. If there
is another feature, then be it on column 80+. I don't think the table
will grow to 100+ chars in the future. If so, we probably need to
redesign it anyhow.

> To be honest, I don't really care. All I wanted is that columns are
> properly aligned. If the plan above makes you happier then fine with
> me, I'll do that.

Please do. And thanks for doing annoying whitespace work.
Jean Delvare July 17, 2014, 10 a.m. UTC | #4
On Thu, 17 Jul 2014 10:41:57 +0200, Wolfram Sang wrote:
> 
> > One possibility is to switch to tabs and shift all columns (but the
> > first) by 4 to the right. This rules out the addition of a column in
> > the future, but otherwise fulfills your desire.
> 
> I'd like that. Plus, I am not so strict with the 80 char limit. If there
> is another feature, then be it on column 80+. I don't think the table
> will grow to 100+ chars in the future. If so, we probably need to
> redesign it anyhow.

Agreed.

> > To be honest, I don't really care. All I wanted is that columns are
> > properly aligned. If the plan above makes you happier then fine with
> > me, I'll do that.
> 
> Please do. And thanks for doing annoying whitespace work.

No problem. Above 30°C that's about all my brain is good at anyway ;-)
diff mbox

Patch

--- linux-3.16-rc1.orig/drivers/i2c/busses/i2c-i801.c	2014-06-16 05:45:28.000000000 +0200
+++ linux-3.16-rc1/drivers/i2c/busses/i2c-i801.c	2014-06-23 10:33:04.341790691 +0200
@@ -22,57 +22,57 @@ 
 */
 
 /*
-  Supports the following Intel I/O Controller Hubs (ICH):
-
-                                  I/O                     Block   I2C
-                                  region  SMBus   Block   proc.   block
-  Chip name             PCI ID    size    PEC     buffer  call    read
-  ----------------------------------------------------------------------
-  82801AA  (ICH)        0x2413     16      no      no      no      no
-  82801AB  (ICH0)       0x2423     16      no      no      no      no
-  82801BA  (ICH2)       0x2443     16      no      no      no      no
-  82801CA  (ICH3)       0x2483     32     soft     no      no      no
-  82801DB  (ICH4)       0x24c3     32     hard     yes     no      no
-  82801E   (ICH5)       0x24d3     32     hard     yes     yes     yes
-  6300ESB               0x25a4     32     hard     yes     yes     yes
-  82801F   (ICH6)       0x266a     32     hard     yes     yes     yes
-  6310ESB/6320ESB       0x269b     32     hard     yes     yes     yes
-  82801G   (ICH7)       0x27da     32     hard     yes     yes     yes
-  82801H   (ICH8)       0x283e     32     hard     yes     yes     yes
-  82801I   (ICH9)       0x2930     32     hard     yes     yes     yes
-  EP80579 (Tolapai)     0x5032     32     hard     yes     yes     yes
-  ICH10                 0x3a30     32     hard     yes     yes     yes
-  ICH10                 0x3a60     32     hard     yes     yes     yes
-  5/3400 Series (PCH)   0x3b30     32     hard     yes     yes     yes
-  6 Series (PCH)        0x1c22     32     hard     yes     yes     yes
-  Patsburg (PCH)        0x1d22     32     hard     yes     yes     yes
-  Patsburg (PCH) IDF    0x1d70     32     hard     yes     yes     yes
-  Patsburg (PCH) IDF    0x1d71     32     hard     yes     yes     yes
-  Patsburg (PCH) IDF    0x1d72     32     hard     yes     yes     yes
-  DH89xxCC (PCH)        0x2330     32     hard     yes     yes     yes
-  Panther Point (PCH)   0x1e22     32     hard     yes     yes     yes
-  Lynx Point (PCH)      0x8c22     32     hard     yes     yes     yes
-  Lynx Point-LP (PCH)   0x9c22     32     hard     yes     yes     yes
-  Avoton (SOC)          0x1f3c     32     hard     yes     yes     yes
-  Wellsburg (PCH)       0x8d22     32     hard     yes     yes     yes
-  Wellsburg (PCH) MS    0x8d7d     32     hard     yes     yes     yes
-  Wellsburg (PCH) MS    0x8d7e     32     hard     yes     yes     yes
-  Wellsburg (PCH) MS    0x8d7f     32     hard     yes     yes     yes
-  Coleto Creek (PCH)    0x23b0     32     hard     yes     yes     yes
-  Wildcat Point-LP (PCH)   0x9ca2     32     hard     yes     yes     yes
-  BayTrail (SOC)        0x0f12     32     hard     yes     yes     yes
-
-  Features supported by this driver:
-  Software PEC                     no
-  Hardware PEC                     yes
-  Block buffer                     yes
-  Block process call transaction   no
-  I2C block read transaction       yes  (doesn't use the block buffer)
-  Slave mode                       no
-  Interrupt processing             yes
-
-  See the file Documentation/i2c/busses/i2c-i801 for details.
-*/
+ * Supports the following Intel I/O Controller Hubs (ICH):
+ *
+ *                                  I/O                     Block   I2C
+ *                                  region  SMBus   Block   proc.   block
+ * Chip name               PCI ID   size    PEC     buffer  call    read
+ * -----------------------------------------------------------------------
+ * 82801AA (ICH)           0x2413    16      no      no      no      no
+ * 82801AB (ICH0)          0x2423    16      no      no      no      no
+ * 82801BA (ICH2)          0x2443    16      no      no      no      no
+ * 82801CA (ICH3)          0x2483    32     soft     no      no      no
+ * 82801DB (ICH4)          0x24c3    32     hard     yes     no      no
+ * 82801E (ICH5)           0x24d3    32     hard     yes     yes     yes
+ * 6300ESB                 0x25a4    32     hard     yes     yes     yes
+ * 82801F (ICH6)           0x266a    32     hard     yes     yes     yes
+ * 6310ESB/6320ESB         0x269b    32     hard     yes     yes     yes
+ * 82801G (ICH7)           0x27da    32     hard     yes     yes     yes
+ * 82801H (ICH8)           0x283e    32     hard     yes     yes     yes
+ * 82801I (ICH9)           0x2930    32     hard     yes     yes     yes
+ * EP80579 (Tolapai)       0x5032    32     hard     yes     yes     yes
+ * ICH10                   0x3a30    32     hard     yes     yes     yes
+ * ICH10                   0x3a60    32     hard     yes     yes     yes
+ * 5/3400 Series (PCH)     0x3b30    32     hard     yes     yes     yes
+ * 6 Series (PCH)          0x1c22    32     hard     yes     yes     yes
+ * Patsburg (PCH)          0x1d22    32     hard     yes     yes     yes
+ * Patsburg (PCH) IDF      0x1d70    32     hard     yes     yes     yes
+ * Patsburg (PCH) IDF      0x1d71    32     hard     yes     yes     yes
+ * Patsburg (PCH) IDF      0x1d72    32     hard     yes     yes     yes
+ * DH89xxCC (PCH)          0x2330    32     hard     yes     yes     yes
+ * Panther Point (PCH)     0x1e22    32     hard     yes     yes     yes
+ * Lynx Point (PCH)        0x8c22    32     hard     yes     yes     yes
+ * Lynx Point-LP (PCH)     0x9c22    32     hard     yes     yes     yes
+ * Avoton (SOC)            0x1f3c    32     hard     yes     yes     yes
+ * Wellsburg (PCH)         0x8d22    32     hard     yes     yes     yes
+ * Wellsburg (PCH) MS      0x8d7d    32     hard     yes     yes     yes
+ * Wellsburg (PCH) MS      0x8d7e    32     hard     yes     yes     yes
+ * Wellsburg (PCH) MS      0x8d7f    32     hard     yes     yes     yes
+ * Coleto Creek (PCH)      0x23b0    32     hard     yes     yes     yes
+ * Wildcat Point-LP (PCH)  0x9ca2    32     hard     yes     yes     yes
+ * BayTrail (SOC)          0x0f12    32     hard     yes     yes     yes
+ *
+ * Features supported by this driver:
+ * Software PEC                     no
+ * Hardware PEC                     yes
+ * Block buffer                     yes
+ * Block process call transaction   no
+ * I2C block read transaction       yes  (doesn't use the block buffer)
+ * Slave mode                       no
+ * Interrupt processing             yes
+ *
+ * See the file Documentation/i2c/busses/i2c-i801 for details.
+ */
 
 #include <linux/interrupt.h>
 #include <linux/module.h>