Skip to contentSkip to conversation

hwmon updates for Linux 3.8

GIT PULL Jean Delvare 2 participants 4 messages Dec 19, 2012 – Dec 20, 2012 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull hwmon subsystem updates for Linux 3.8 from:

git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging.git hwmon-for-linus

There are many improvements to the it87 driver, as well as suspend support for the Winbond Super-I/O chips, and a few other fixes.

 Documentation/hwmon/it87  |   10 +
 drivers/hwmon/hwmon-vid.c |   10 +
 drivers/hwmon/hwmon.c     |   24 +-
 drivers/hwmon/it87.c      |  890 +++++++++++++++++++++++---------------------
 drivers/hwmon/w83627ehf.c |   99 +++++-
 drivers/hwmon/w83627hf.c  |   81 ++++-
 6 files changed, 674 insertions(+), 440 deletions(-)

---------------

Guenter Roeck (10):
hwmon: (it87) Save temperature registers in 2-dimensional array
hwmon: (it87) Save voltage register values in 2-dimensional array
hwmon: (it87) Replace macro defining tempX_type sensors with direct definitions
hwmon: (it87) Introduce support for tempX_offset sysfs attribute
hwmon: (it87) Save fan registers in 2-dimensional array
hwmon: (it87) Avoid quoted string splits across lines
hwmon: (it87) Replace pwm group macro with direct attribute definitions
hwmon: (it87) Manage device specific features with table
hwmon: (it87) Report thermal sensor type as Intel PECI if appropriate
hwmon: (it87) Support PECI for additional chips

Jean Delvare (6):
hwmon: Fix PCI device reference leak in quirk
hwmon: (w83627hf) Add support for suspend
hwmon: (w83627ehf) Add support for suspend
hwmon: (w83627hf) Don't touch nonexistent I2C address registers
hwmon: (w83627ehf) Get rid of smatch warnings
hwmon-vid: Add support for AMD family 11h to 15h processors

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Jean Delvare

Hi Linus,

Quoted 5 lines · Linus Torvalds
Quoted 2 lines · Jean Delvare
 6 files changed, 674 insertions(+), 440 deletions(-)

This is not what I get when I pull. What's up?

This is not what I get when I pull from another host either. The file count is correct, but I get 689 insertions and 455 deletions.

I investigated it and found that this is caused by the differences being expressed slightly differently. For example:

drivers/hwmon/hwmon.c +13 -11
@@ -84,19 +84,21 @@ static void __init hwmon_pci_quirks(void)
 
        /* Open access to 0x295-0x296 on MSI MS-7031 */
        sb = pci_get_device(PCI_VENDOR_ID_ATI, 0x436c, NULL);
-       if (sb &&
-           (sb->subsystem_vendor = 0x1462 &&  /* MSI */
-            sb->subsystem_device = 0x0031)) { /* MS-7031 */
+       if (sb) {
+               if (sb->subsystem_vendor = 0x1462 &&   /* MSI */
+                   sb->subsystem_device = 0x0031) {   /* MS-7031 */
+                       pci_read_config_byte(sb, 0x48, &enable);
+                       pci_read_config_word(sb, 0x64, &base);
 
-               pci_read_config_byte(sb, 0x48, &enable);
-               pci_read_config_word(sb, 0x64, &base);
-
-               if (base = 0 && !(enable & BIT(2))) {
-                       dev_info(&sb->dev,
-                                "Opening wide generic port at 0x295\n");
-                       pci_write_config_word(sb, 0x64, 0x295);
-                       pci_write_config_byte(sb, 0x48, enable | BIT(2));
+                       if (base = 0 && !(enable & BIT(2))) {
+                               dev_info(&sb->dev,
+                                        "Opening wide generic port at 0x295\n");
+                               pci_write_config_word(sb, 0x64, 0x295);
+                               pci_write_config_byte(sb, 0x48,
+                                                     enable | BIT(2));
+                       }
                }
+               pci_dev_put(sb);
        }
 #endif
 }

on my side, became:

drivers/hwmon/hwmon.c +14 -12
@@ -84,19 +84,21 @@ static void __init hwmon_pci_quirks(void)
 
        /* Open access to 0x295-0x296 on MSI MS-7031 */
        sb = pci_get_device(PCI_VENDOR_ID_ATI, 0x436c, NULL);
-       if (sb &&
-           (sb->subsystem_vendor = 0x1462 &&  /* MSI */
-            sb->subsystem_device = 0x0031)) { /* MS-7031 */
-
-               pci_read_config_byte(sb, 0x48, &enable);
-               pci_read_config_word(sb, 0x64, &base);
-
-               if (base = 0 && !(enable & BIT(2))) {
-                       dev_info(&sb->dev,
-                                "Opening wide generic port at 0x295\n");
-                       pci_write_config_word(sb, 0x64, 0x295);
-                       pci_write_config_byte(sb, 0x48, enable | BIT(2));
+       if (sb) {
+               if (sb->subsystem_vendor = 0x1462 &&   /* MSI */
+                   sb->subsystem_device = 0x0031) {   /* MS-7031 */
+                       pci_read_config_byte(sb, 0x48, &enable);
+                       pci_read_config_word(sb, 0x64, &base);
+
+                       if (base = 0 && !(enable & BIT(2))) {
+                               dev_info(&sb->dev,
+                                        "Opening wide generic port at 0x295\n");
+                               pci_write_config_word(sb, 0x64, 0x295);
+                               pci_write_config_byte(sb, 0x48,
+                                                     enable | BIT(2));
+                       }
                }
+               pci_dev_put(sb);
        }
 #endif
 }

on the far side. So the diffstat difference comes from an extra blank line being deleted and reinserted.

You'll notice that 674 - 440 = 689 - 455 so I presume the different numbers for it87.c have the same explanation and the end result would be correct.

At first I thought that this was caused by me using diff option -d when generating the patch originally. However dropping it did change the output but still did not lead to what I get when pulling from git.

So I can only suspect that the differences were somehow reformatted by the git instance on kernel.org. Maybe different versions of git have a different diffing algorithm? I don't even know if git has its own diff implementation or if it relies on the system diff command. For what it's worth, I am running the following:

git version 1.7.7
GNU diff version 3.1

Also note that the patches went into git with quiltimport, if that makes a difference.

If you have suggestions, I'm all ears, but I think you can just take this pull request as is.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw
In reply to Jean Delvare
Quoted 7 lines · Jean Delvare

At first I thought that this was caused by me using diff option -d when generating the patch originally. However dropping it did change the output but still did not lead to what I get when pulling from git.

So I can only suspect that the differences were somehow reformatted by the git instance on kernel.org.

All diffing is done at run-time, so it's always the local version that matters.

And it does look like this is one of the fairly rare cases where the git version matters (probably because the XDL_NEED_MINIMAL flag got dropped due to some excessive CPU use in extreme cases). I notice that "git diff --patience" gives something much closer to your local result.

Linus

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors