Per hwmon ABI, temperature sensor attribute index starts with 1, not 0.

Signed-off-by: Guenter Roeck <li...@roeck-us.net>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c 
b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
index 3081974..e74ae36 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
@@ -118,22 +118,22 @@ static int ixgbe_add_hwmon_attr(struct ixgbe_adapter 
*adapter,
        case IXGBE_HWMON_TYPE_LOC:
                ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_location;
                snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
-                        "temp%u_label", offset);
+                        "temp%u_label", offset + 1);
                break;
        case IXGBE_HWMON_TYPE_TEMP:
                ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_temp;
                snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
-                        "temp%u_input", offset);
+                        "temp%u_input", offset + 1);
                break;
        case IXGBE_HWMON_TYPE_CAUTION:
                ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_cautionthresh;
                snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
-                        "temp%u_max", offset);
+                        "temp%u_max", offset + 1);
                break;
        case IXGBE_HWMON_TYPE_MAX:
                ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_maxopthresh;
                snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
-                        "temp%u_crit", offset);
+                        "temp%u_crit", offset + 1);
                break;
        default:
                rc = -EPERM;
-- 
1.7.9.7


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to