[PATCH 10/21] e1000: Remove 'page_size'

Andrey Smirnov andrew.smirnov at gmail.com
Tue May 31 10:09:29 PDT 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 76872f0..bb5f697 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -688,7 +688,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 b6414b2..e4ef5f9 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -315,13 +315,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;
@@ -341,13 +338,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:
@@ -355,13 +350,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;
 
@@ -378,13 +371,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:
@@ -392,7 +383,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.5




More information about the barebox mailing list