提交 22dd81c5 编写于 作者: G Guenter Roeck 提交者: Jeff Kirsher

ixgbe: Start temperature sensor attribute index with 1

Per hwmon ABI, temperature sensor attribute index starts with 1, not 0.
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Reviewed-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 03b77d81
...@@ -118,22 +118,22 @@ static int ixgbe_add_hwmon_attr(struct ixgbe_adapter *adapter, ...@@ -118,22 +118,22 @@ static int ixgbe_add_hwmon_attr(struct ixgbe_adapter *adapter,
case IXGBE_HWMON_TYPE_LOC: case IXGBE_HWMON_TYPE_LOC:
ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_location; ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_location;
snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name), snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
"temp%u_label", offset); "temp%u_label", offset + 1);
break; break;
case IXGBE_HWMON_TYPE_TEMP: case IXGBE_HWMON_TYPE_TEMP:
ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_temp; ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_temp;
snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name), snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
"temp%u_input", offset); "temp%u_input", offset + 1);
break; break;
case IXGBE_HWMON_TYPE_CAUTION: case IXGBE_HWMON_TYPE_CAUTION:
ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_cautionthresh; ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_cautionthresh;
snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name), snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
"temp%u_max", offset); "temp%u_max", offset + 1);
break; break;
case IXGBE_HWMON_TYPE_MAX: case IXGBE_HWMON_TYPE_MAX:
ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_maxopthresh; ixgbe_attr->dev_attr.show = ixgbe_hwmon_show_maxopthresh;
snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name), snprintf(ixgbe_attr->name, sizeof(ixgbe_attr->name),
"temp%u_crit", offset); "temp%u_crit", offset + 1);
break; break;
default: default:
rc = -EPERM; rc = -EPERM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册