[33/33] fix unused parameter warning in e1000_get_mac_type()
diff mbox series

Message ID 20191017182121.103569-33-zenczykowski@gmail.com
State Accepted
Delegated to: John Linville
Headers show
Series
  • [01/33] fix arithmetic on pointer to void is a GNU extension warning
Related show

Commit Message

Maciej ┼╗enczykowski Oct. 17, 2019, 6:21 p.m. UTC
From: Maciej ┼╗enczykowski <maze@google.com>

This fixes:
  external/ethtool/e1000.c:258:38: error: unused parameter 'revision_id' [-Werror,-Wunused-parameter]
  e1000_get_mac_type(u16 device_id, u8 revision_id)

Signed-off-by: Maciej ┼╗enczykowski <maze@google.com>
Change-Id: I2469ef61996fd273cc3a2a6a7af0ae889c81b02b
---
 e1000.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/e1000.c b/e1000.c
index da057b7..91e5bc1 100644
--- a/e1000.c
+++ b/e1000.c
@@ -254,8 +254,7 @@  enum e1000_mac_type {
 	e1000_num_macs
 };
 
-static enum e1000_mac_type
-e1000_get_mac_type(u16 device_id, u8 revision_id)
+static enum e1000_mac_type e1000_get_mac_type(u16 device_id)
 {
 	enum e1000_mac_type mac_type = e1000_undefined;
 
@@ -369,7 +368,7 @@  int e1000_dump_regs(struct ethtool_drvinfo *info maybe_unused,
 {
 	u32 *regs_buff = (u32 *)regs->data;
 	u16 hw_device_id = (u16)regs->version;
-	u8 hw_revision_id = (u8)(regs->version >> 16);
+	/* u8 hw_revision_id = (u8)(regs->version >> 16); */
 	u8 version = (u8)(regs->version >> 24);
 	enum e1000_mac_type mac_type;
 	u32 reg;
@@ -377,7 +376,7 @@  int e1000_dump_regs(struct ethtool_drvinfo *info maybe_unused,
 	if (version != 1)
 		return -1;
 
-	mac_type = e1000_get_mac_type(hw_device_id, hw_revision_id);
+	mac_type = e1000_get_mac_type(hw_device_id);
 
 	if(mac_type == e1000_undefined)
 		return -1;