[PATCH 08/20] e1000: Remove 'page_size'

Andrey Smirnov andrew.smirnov at gmail.com
Sun Jan 17 19:52:29 PST 2016


Remove 'page_size' from 'struct e1000_eeprom_info' since it is not
used anywhere in the code.

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 drivers/net/e1000/e1000.h  |  1 -
 drivers/net/e1000/eeprom.c | 32 +++++++++++---------------------
 2 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 97fe52f..8ec45a7 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -699,7 +699,6 @@ struct e1000_eeprom_info {
 	uint16_t opcode_bits;
 	uint16_t address_bits;
 	uint16_t delay_usec;
-	uint16_t page_size;
 	bool use_eerd;
 };

diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 7b4c77d..0cd0bf5 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -316,13 +316,10 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 			eeprom->type = e1000_eeprom_spi;
 			eeprom->opcode_bits = 8;
 			eeprom->delay_usec = 1;
-			if (eecd & E1000_EECD_ADDR_BITS) {
-				eeprom->page_size = 32;
+			if (eecd & E1000_EECD_ADDR_BITS)
 				eeprom->address_bits = 16;
-			} else {
-				eeprom->page_size = 8;
+			else
 				eeprom->address_bits = 8;
-			}
 		} else {
 			eeprom->type = e1000_eeprom_microwire;
 			eeprom->opcode_bits = 3;
@@ -342,13 +339,11 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 		eeprom->type = e1000_eeprom_spi;
 		eeprom->opcode_bits = 8;
 		eeprom->delay_usec = 1;
-		if (eecd & E1000_EECD_ADDR_BITS) {
-			eeprom->page_size = 32;
+		if (eecd & E1000_EECD_ADDR_BITS)
 			eeprom->address_bits = 16;
-		} else {
-			eeprom->page_size = 8;
+		else
 			eeprom->address_bits = 8;
-		}
+
 		eeprom->use_eerd = false;
 		break;
 	case e1000_82573:
@@ -356,13 +351,11 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 		eeprom->type = e1000_eeprom_spi;
 		eeprom->opcode_bits = 8;
 		eeprom->delay_usec = 1;
-		if (eecd & E1000_EECD_ADDR_BITS) {
-			eeprom->page_size = 32;
+		if (eecd & E1000_EECD_ADDR_BITS)
 			eeprom->address_bits = 16;
-		} else {
-			eeprom->page_size = 8;
+		else
 			eeprom->address_bits = 8;
-		}
+
 		if (e1000_is_onboard_nvm_eeprom(hw) == false) {
 			eeprom->use_eerd = true;

@@ -379,13 +372,11 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 		eeprom->type = e1000_eeprom_spi;
 		eeprom->opcode_bits = 8;
 		eeprom->delay_usec = 1;
-		if (eecd & E1000_EECD_ADDR_BITS) {
-			eeprom->page_size = 32;
+		if (eecd & E1000_EECD_ADDR_BITS)
 			eeprom->address_bits = 16;
-		} else {
-			eeprom->page_size = 8;
+		else
 			eeprom->address_bits = 8;
-		}
+
 		eeprom->use_eerd = true;
 		break;
 	case e1000_igb:
@@ -393,7 +384,6 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
 		eeprom->type = e1000_eeprom_invm;
 		eeprom->opcode_bits = 8;
 		eeprom->delay_usec = 1;
-		eeprom->page_size = 32;
 		eeprom->address_bits = 16;
 		eeprom->use_eerd = true;
 		break;
--
2.5.0



More information about the barebox mailing list