Skip to contentSkip to conversation

e1000: #if 0 two functions

PATCH Applied [email protected] 3 participants 4 messages Aug 10, 2007 – Aug 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 12/18 e1000: #if 0 two functions

From: Adrian Bunk <[email protected]>

e1000_{read,write}_pci_cfg() are no longer used.

---

 drivers/net/e1000/e1000_hw.h   |    2 --
 drivers/net/e1000/e1000_main.c |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/e1000/e1000_hw.h renamed from drivers/net/e1000/e1000_hw.h~e1000-if-0-two-functions +0 -2
diff -puN drivers/net/e1000/e1000_hw.h~e1000-if-0-two-functions drivers/net/e1000/e1000_hw.h
@@ -421,8 +421,6 @@ void e1000_tbi_adjust_stats(struct e1000
 void e1000_get_bus_info(struct e1000_hw *hw);
 void e1000_pci_set_mwi(struct e1000_hw *hw);
 void e1000_pci_clear_mwi(struct e1000_hw *hw);
-void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
-void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
 int32_t e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value);
 void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc);
 int e1000_pcix_get_mmrbc(struct e1000_hw *hw);
drivers/net/e1000/e1000_main.c renamed from drivers/net/e1000/e1000_main.c~e1000-if-0-two-functions +4 -0
diff -puN drivers/net/e1000/e1000_main.c~e1000-if-0-two-functions drivers/net/e1000/e1000_main.c
@@ -4890,6 +4890,8 @@ e1000_pci_clear_mwi(struct e1000_hw *hw)
 	pci_clear_mwi(adapter->pdev);
 }
 
+#if 0
+
 void
 e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
 {
@@ -4906,6 +4908,8 @@ e1000_write_pci_cfg(struct e1000_hw *hw,
 	pci_write_config_word(adapter->pdev, reg, *value);
 }
 
+#endif  /*  0  */
+
 int
 e1000_pcix_get_mmrbc(struct e1000_hw *hw)
 {

_

#1 lore raw
Quoted 4 lines · [email protected] wrote:

From: Adrian Bunk <[email protected]>

e1000_{read,write}_pci_cfg() are no longer used.

Quoted 8 lines

---

 drivers/net/e1000/e1000_hw.h   |    2 --
 drivers/net/e1000/e1000_main.c |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

if it's truly dead code in upstream, we should just remove it from e1000

#2 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 9 lines · [email protected] wrote:

From: Adrian Bunk <[email protected]>

e1000_{read,write}_pci_cfg() are no longer used.

---

Quoted 5 lines
Quoted 3 lines
 drivers/net/e1000/e1000_hw.h   |    2 --
 drivers/net/e1000/e1000_main.c |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

if it's truly dead code in upstream, we should just remove it from e1000

if I apply this to #master and compile, it blows up: the two functions are still in use there. I also don't see any difference with current #upstream....

so, I don't know what is in -mm at the moment, but we do not want this in jeff's tree.

Auke

#3 lore raw
Quoted 11 lines · Auke
Quoted 10 lines · Jeff Garzik
Quoted 9 lines · [email protected] wrote:

From: Adrian Bunk <[email protected]>

e1000_{read,write}_pci_cfg() are no longer used.

---

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
 drivers/net/e1000/e1000_hw.h   |    2 --
 drivers/net/e1000/e1000_main.c |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

if it's truly dead code in upstream, we should just remove it from e1000

if I apply this to #master and compile, it blows up: the two functions are still in use there. I also don't see any difference with current #upstream....

so, I don't know what is in -mm at the moment, but we do not want this in jeff's tree.

whoops, I fail to correlate this with the mmrbc patch I just acked 5 minutes ago, which removes the need for these functions.

I'll push a patch to remove these functions once I hear what the plan is for the mmrbc patch.

Cheers,

Auke