Skip to contentSkip to conversation

Removing dead code in /drivers/net/wan/hdlc_fr.c

PATCH Applied Krzysztof Halasa 2 participants 2 messages Apr 20, 2008 – Apr 25, 2008

Subsystems (3)
lore
Share & tools
lore

Krzysztof Halasa

author maintainer
#0 lore raw

PATCH 1/1 Removing dead code in /drivers/net/wan/hdlc_fr.c

From: Cédric Augonnet <[email protected]>

Removing dead code in /drivers/net/wan/hdlc_fr.c

The local variable "prefix" is never used anymore, and the content of this string appears a bit later, directly in a call to "alloc_netdev" after doing exactly the same if/else test. So there seems to be no point keeping those 4 lines anymore.

drivers/net/wan/hdlc_fr.c +0 -4
index c4ab032..520bb0b 100644
@@ -1090,10 +1090,6 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
 	pvc_device *pvc = NULL;
 	struct net_device *dev;
 	int result, used;
-	char * prefix = "pvc%d";
-
-	if (type == ARPHRD_ETHER)
-		prefix = "pvceth%d";
 
 	if ((pvc = add_pvc(frad, dlci)) == NULL) {
 		printk(KERN_WARNING "%s: Memory squeeze on fr_add_pvc()\n",
Applied
#1 lore raw
Quoted 17 lines · Krzysztof Halasa

From: Cédric Augonnet <[email protected]>

Removing dead code in /drivers/net/wan/hdlc_fr.c

The local variable "prefix" is never used anymore, and the content of this string appears a bit later, directly in a call to "alloc_netdev" after doing exactly the same if/else test. So there seems to be no point keeping those 4 lines anymore.

drivers/net/wan/hdlc_fr.c +0 -0
index c4ab032..520bb0b 100644

drivers/net/wan/hdlc_fr.c static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) · line 1094

Quoted 9 lines
drivers/net/wan/hdlc_fr.c +0 -4
@@ -1090,10 +1090,6 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
 	pvc_device *pvc = NULL;
 	struct net_device *dev;
 	int result, used;
-	char * prefix = "pvc%d";
-
-	if (type == ARPHRD_ETHER)
-		prefix = "pvceth%d";
 
 	if ((pvc = add_pvc(frad, dlci)) == NULL) {

applied