Skip to contentSkip to conversation

i2c-i801: Fix the alignment of the device table

PATCH Superseded Jean Delvare 2 participants 5 messages Jun 23, 2014 – Jul 17, 2014 2 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-i801: Fix the alignment of the device table

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.

Cc James Ralston <[email protected]>
Cc Wolfram Sang <wsa-z923LK4zBo2bacvFa/[email protected]>
---
 drivers/i2c/busses/i2c-i801.c |  102 +++++++++++++++++++++---------------------
 1 file changed, 51 insertions(+), 51 deletions(-)
drivers/i2c/busses/i2c-i801.c +51 -51
@@ -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>
Signature · 2 lines
Jean Delvare
SUSE L3 Support

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Jean Delvare

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.

Cc James Ralston <[email protected]>
Cc Wolfram Sang <wsa-z923LK4zBo2bacvFa/[email protected]>

Hmmm, what about giving the names even more space so we have some buffer for the future? And what about replacing spaces with tabs?

#3 lore raw

Hi Wolfram,

Quoted 11 lines · Wolfram Sang
Quoted 7 lines · Jean Delvare

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.

Cc James Ralston <[email protected]>
Cc Wolfram Sang <wsa-z923LK4zBo2bacvFa/[email protected]>

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.

Signature · 2 lines
Jean Delvare
SUSE L3 Support

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 4 lines

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.

Quoted 3 lines

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.

#6 lore raw
Quoted 9 lines · Wolfram Sang
Quoted 4 lines

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.

Quoted 5 lines
Quoted 3 lines

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 ;-)

Signature · 2 lines
Jean Delvare
SUSE L3 Support