Skip to contentSkip to conversation

ucc_geth: Remove UGETH_FILTERING dead code

PATCH In review Anton Vorontsov 3 participants 3 messages Dec 18, 2008 – Dec 22, 2008

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

PATCH 6/6 ucc_geth: Remove UGETH_FILTERING dead code

The code appears to be dead: nobody call these functions, plus build breaks when UGETH_FILTERING is enabled:

ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash':
ucc_geth.c:1856: error: dereferencing pointer to incomplete type
ucc_geth.c:1874: error: dereferencing pointer to incomplete type
ucc_geth.c:1877: warning: return from incompatible pointer type
ucc_geth.c: At top level:
ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash':
ucc_geth.c:1894: error: dereferencing pointer to incomplete type
ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1909: warning: assignment from incompatible pointer type
ucc_geth.c:1918: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash':
ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type ucc_geth.c:1947: warning: assignment from incompatible pointer type
ucc_geth.c:1954: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr':
ucc_geth.c:2064: error: dereferencing pointer to incomplete type
ucc_geth.c:2073: error: dereferencing pointer to incomplete type
ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type make[2]: *** [ucc_geth.o] Error 1

The code is there since the driver was merged, and nobody seem to be interested in fixing or actually using it. If we ever want the filtering support, we can always revert the patch and fix it, but so far it just draws reader's attention.

---
 drivers/net/Kconfig    |    4 -
 drivers/net/ucc_geth.c |  262 ------------------------------------------------
 2 files changed, 0 insertions(+), 266 deletions(-)
drivers/net/Kconfig +0 -4
index 231eeaf..88b684e 100644
@@ -2276,10 +2276,6 @@ config UGETH_MAGIC_PACKET
 	bool "Magic Packet detection support"
 	depends on UCC_GETH
 
-config UGETH_FILTERING
-	bool "Mac address filtering support"
-	depends on UCC_GETH
-
 config UGETH_TX_ON_DEMAND
 	bool "Transmit on Demand support"
 	depends on UCC_GETH
drivers/net/ucc_geth.c +0 -262

292 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 2 lines · Anton Vorontsov

The code appears to be dead: nobody call these functions, plus build breaks when UGETH_FILTERING is enabled:

I general, I agree with patches like this, but I'd like to hear from Leo first why this code was written in the first place before I can ack it.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
Acked-by
#2 lore raw
Quoted 8 lines · Timur Tabi
Quoted 2 lines · Anton Vorontsov

The code appears to be dead: nobody call these functions, plus build breaks when UGETH_FILTERING is enabled:

I general, I agree with patches like this, but I'd like to hear from Leo first why this code was written in the first place before I can ack it.

The code was there to test the frame filtering feature which probably can be used in multicast and VLAN support. I didn't remove it because it could be a base for whoever interested to implement a general frame filtering framework or custom features. Given the fact that unused code can easily become broken. I agree that it can be removed for now.