This is a note to let you know that I've just added the patch titled

    hwmon: (fam15h_power) Correct sign extension of running_avg_capture

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hwmon-fam15h_power-correct-sign-extension-of-running_avg_capture.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From fc0900cbda9243957d812cd6b4cc87965f9fe75f Mon Sep 17 00:00:00 2001
From: Andreas Herrmann <[email protected]>
Date: Fri, 23 Mar 2012 10:02:17 +0100
Subject: hwmon: (fam15h_power) Correct sign extension of running_avg_capture

From: Andreas Herrmann <[email protected]>

commit fc0900cbda9243957d812cd6b4cc87965f9fe75f upstream.

Wrong bit was used for sign extension which caused wrong end results.
Thanks to Andre for spotting this bug.

Reported-by: Andre Przywara <[email protected]>
Signed-off-by: Andreas Herrmann <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/hwmon/fam15h_power.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwmon/fam15h_power.c
+++ b/drivers/hwmon/fam15h_power.c
@@ -60,7 +60,7 @@ static ssize_t show_power(struct device
        pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5),
                                  REG_TDP_RUNNING_AVERAGE, &val);
        running_avg_capture = (val >> 4) & 0x3fffff;
-       running_avg_capture = sign_extend32(running_avg_capture, 22);
+       running_avg_capture = sign_extend32(running_avg_capture, 21);
        running_avg_range = val & 0xf;
 
        pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5),


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.3/hwmon-fam15h_power-correct-sign-extension-of-running_avg_capture.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to