All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] net: e1000: Mark _disable_wr() and _write_status() as __maybe_unused
Date: Mon, 16 Nov 2015 01:19:18 -0800	[thread overview]
Message-ID: <1447665558-21632-3-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1447665558-21632-1-git-send-email-bmeng.cn@gmail.com>

Per the comments, e1000_spi_eeprom_disable_wr() and
e1000_spi_eeprom_write_status() have been tested.
Remove the #if 0, #endif and mark them as __maybe_unused.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/net/e1000_spi.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index e7f6826..604ee6b 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -181,22 +181,21 @@ static int e1000_spi_eeprom_enable_wr(struct e1000_hw *hw, bool intr)
  * These have been tested to perform correctly, but they are not used by any
  * of the EEPROM commands at this time.
  */
-#if 0
-static int e1000_spi_eeprom_disable_wr(struct e1000_hw *hw, bool intr)
+static __maybe_unused int e1000_spi_eeprom_disable_wr(struct e1000_hw *hw,
+						      bool intr)
 {
 	u8 op[] = { SPI_EEPROM_DISABLE_WR };
 	e1000_standby_eeprom(hw);
 	return e1000_spi_xfer(hw, 8*sizeof(op), op, NULL, intr);
 }
 
-static int e1000_spi_eeprom_write_status(struct e1000_hw *hw,
-		u8 status, bool intr)
+static __maybe_unused int e1000_spi_eeprom_write_status(struct e1000_hw *hw,
+							u8 status, bool intr)
 {
 	u8 op[] = { SPI_EEPROM_WRITE_STATUS, status };
 	e1000_standby_eeprom(hw);
 	return e1000_spi_xfer(hw, 8*sizeof(op), op, NULL, intr);
 }
-#endif
 
 static int e1000_spi_eeprom_read_status(struct e1000_hw *hw, bool intr)
 {
-- 
1.8.2.1

  parent reply	other threads:[~2015-11-16  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16  9:19 [U-Boot] [PATCH 1/3] net: e1000: Remove dead codes wrapped by #if 0 Bin Meng
2015-11-16  9:19 ` [U-Boot] [PATCH 2/3] net: e1000: Remove CONFIG_MVBC_1G Bin Meng
2015-11-20 22:19   ` Joe Hershberger
2015-12-22 18:00   ` Joe Hershberger
2015-11-16  9:19 ` Bin Meng [this message]
2015-11-20 22:19   ` [U-Boot] [PATCH 3/3] net: e1000: Mark _disable_wr() and _write_status() as __maybe_unused Joe Hershberger
2015-12-22 18:01   ` Joe Hershberger
2015-11-20 22:19 ` [U-Boot] [PATCH 1/3] net: e1000: Remove dead codes wrapped by #if 0 Joe Hershberger
2015-12-22 18:00 ` Joe Hershberger

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=1447665558-21632-3-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.