From: Guenter Roeck <linux@roeck-us.net>
To: netdev@vger.kernel.org
Cc: Nithin Nayak Sujir <nsujir@broadcom.com>,
e1000-devel@lists.sourceforge.net,
Bruce Allan <bruce.w.allan@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
lm-sensors@lm-sensors.org, Michael Chan <mchan@broadcom.com>,
"David S. Miller" <davem@davemloft.net>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 4/5] igb: Start temperature sensor attribute index with 1
Date: Fri, 22 Nov 2013 22:08:00 -0800 [thread overview]
Message-ID: <1385186881-7931-5-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1385186881-7931-1-git-send-email-linux@roeck-us.net>
Per hwmon ABI, temperature sensor attribute index starts with 1, not 0.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/net/ethernet/intel/igb/igb_hwmon.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c
index 2e7ef2d..e0af5bc 100644
--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
+++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
@@ -124,22 +124,22 @@ static int igb_add_hwmon_attr(struct igb_adapter *adapter,
case IGB_HWMON_TYPE_LOC:
igb_attr->dev_attr.show = igb_hwmon_show_location;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_label", offset);
+ "temp%u_label", offset + 1);
break;
case IGB_HWMON_TYPE_TEMP:
igb_attr->dev_attr.show = igb_hwmon_show_temp;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_input", offset);
+ "temp%u_input", offset + 1);
break;
case IGB_HWMON_TYPE_CAUTION:
igb_attr->dev_attr.show = igb_hwmon_show_cautionthresh;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_max", offset);
+ "temp%u_max", offset + 1);
break;
case IGB_HWMON_TYPE_MAX:
igb_attr->dev_attr.show = igb_hwmon_show_maxopthresh;
snprintf(igb_attr->name, sizeof(igb_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® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2013-11-23 6:08 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-23 6:07 [PATCH 0/5] net: hwmon fixes Guenter Roeck
2013-11-23 6:07 ` [PATCH 1/5] tg3: Convert to use hwmon_device_register_with_groups Guenter Roeck
2013-11-23 14:32 ` [lm-sensors] " Jean Delvare
2013-11-26 1:52 ` Nithin Nayak Sujir
2013-11-26 2:47 ` Guenter Roeck
2013-11-26 17:50 ` Nithin Nayak Sujir
2013-11-28 23:22 ` David Miller
2013-11-23 6:07 ` [PATCH 2/5] igb: Convert to use devm_hwmon_device_register_with_groups Guenter Roeck
2013-11-25 23:16 ` Jeff Kirsher
2013-11-23 6:07 ` [PATCH 3/5] ixgbe: " Guenter Roeck
2013-11-25 23:17 ` Jeff Kirsher
2013-11-23 6:08 ` Guenter Roeck [this message]
2013-11-23 12:58 ` [lm-sensors] [PATCH 4/5] igb: Start temperature sensor attribute index with 1 Jean Delvare
2013-11-25 23:17 ` Jeff Kirsher
2013-11-23 6:08 ` [PATCH 5/5] ixgbe: " Guenter Roeck
2013-11-23 13:01 ` [lm-sensors] " Jean Delvare
2013-11-25 18:08 ` Guenter Roeck
2013-11-25 23:18 ` Jeff Kirsher
2013-11-23 16:48 ` [PATCH 0/5] net: hwmon fixes Ben Hutchings
2013-11-23 17:07 ` Guenter Roeck
2013-11-25 17:15 ` Ben Hutchings
2013-11-25 17:48 ` Guenter Roeck
2013-11-26 20:08 ` Ben Hutchings
2013-11-27 3:28 ` Guenter Roeck
2013-11-25 18:23 ` [lm-sensors] " Jean Delvare
2013-11-25 18:56 ` Ben Hutchings
2013-11-25 19:34 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385186881-7931-5-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jesse.brandeburg@intel.com \
--cc=lm-sensors@lm-sensors.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=nsujir@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).