From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b7nBK-0003h8-Ej for barebox@lists.infradead.org; Tue, 31 May 2016 17:10:19 +0000 Received: by mail-pa0-x241.google.com with SMTP id x1so9074539pav.1 for ; Tue, 31 May 2016 10:09:58 -0700 (PDT) From: Andrey Smirnov Date: Tue, 31 May 2016 10:09:25 -0700 Message-Id: <1464714580-31488-7-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: <1464714580-31488-1-git-send-email-andrew.smirnov@gmail.com> References: <1464714580-31488-1-git-send-email-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 06/21] e1000: Do not read same register twice To: barebox@lists.infradead.org Cc: Andrey Smirnov EEPROM_INIT_CONTROL2_REG is already read once before entering this switch statement, so there's not much use in reading its value for the second time. Signed-off-by: Andrey Smirnov --- drivers/net/e1000/main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c index 6d92cde..11a0a2f 100644 --- a/drivers/net/e1000/main.c +++ b/drivers/net/e1000/main.c @@ -839,12 +839,6 @@ static int e1000_setup_link(struct e1000_hw *hw) hw->fc = e1000_fc_full; break; default: - ret_val = e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data); - if (ret_val) { - dev_dbg(hw->dev, "EEPROM Read Error\n"); - return -E1000_ERR_EEPROM; - } - if ((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == 0) hw->fc = e1000_fc_none; else if ((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == EEPROM_WORD0F_ASM_DIR) -- 2.5.5 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox