netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
@ 2008-07-02 19:12 Krzysztof Halasa
  2008-07-02 20:17 ` Adrian Bunk
  2008-07-09 14:44 ` Lennart Sorensen
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Halasa @ 2008-07-02 19:12 UTC (permalink / raw)
  To: netdev, lkml

For review only, the actual patch will be made available in git.

Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
    
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 9ab31a3..6c20205 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -565,9 +565,6 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
 {
 	wanif_conf_t *cnf;
 	struct net_device *dev = NULL;
-#ifdef CONFIG_WANPIPE_MULTPPP
-	struct ppp_device *pppdev=NULL;
-#endif
 	int err;
 
 	if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
@@ -586,25 +583,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
 		goto out;
 
 	if (cnf->config_id == WANCONFIG_MPPP) {
-#ifdef CONFIG_WANPIPE_MULTPPP
-		pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL);
-		err = -ENOBUFS;
-		if (pppdev == NULL)
-			goto out;
-		pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
-		if (pppdev->dev == NULL) {
-			kfree(pppdev);
-			err = -ENOBUFS;
-			goto out;
-		}
-		err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
-		dev = pppdev->dev;
-#else
 		printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
 				wandev->name);
 		err = -EPROTONOSUPPORT;
 		goto out;
-#endif
 	} else {
 		dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
 		err = -ENOBUFS;
@@ -659,17 +641,9 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
 	kfree(dev->priv);
 	dev->priv = NULL;
 
-#ifdef CONFIG_WANPIPE_MULTPPP
-	if (cnf->config_id == WANCONFIG_MPPP)
-		kfree(pppdev);
-	else
-		kfree(dev);
-#else
 	/* Sync PPP is disabled */
 	if (cnf->config_id != WANCONFIG_MPPP)
 		kfree(dev);
-#endif
-
 out:
 	kfree(cnf);
 	return err;

-- 
Krzysztof Halasa

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
  2008-07-02 19:12 WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist Krzysztof Halasa
@ 2008-07-02 20:17 ` Adrian Bunk
  2008-07-02 20:21   ` Krzysztof Halasa
  2008-07-09 14:44 ` Lennart Sorensen
  1 sibling, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2008-07-02 20:17 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: netdev, lkml

On Wed, Jul 02, 2008 at 09:12:55PM +0200, Krzysztof Halasa wrote:
> For review only, the actual patch will be made available in git.
> 
> Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
>     
> diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
> index 9ab31a3..6c20205 100644
> --- a/net/wanrouter/wanmain.c
> +++ b/net/wanrouter/wanmain.c
> @@ -565,9 +565,6 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
>  {
>  	wanif_conf_t *cnf;
>  	struct net_device *dev = NULL;
> -#ifdef CONFIG_WANPIPE_MULTPPP
> -	struct ppp_device *pppdev=NULL;
> -#endif
>  	int err;
>  
>  	if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
> @@ -586,25 +583,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
>  		goto out;
>  
>  	if (cnf->config_id == WANCONFIG_MPPP) {
> -#ifdef CONFIG_WANPIPE_MULTPPP
> -		pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL);
> -		err = -ENOBUFS;
> -		if (pppdev == NULL)
> -			goto out;
> -		pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
> -		if (pppdev->dev == NULL) {
> -			kfree(pppdev);
> -			err = -ENOBUFS;
> -			goto out;
> -		}
> -		err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
> -		dev = pppdev->dev;
> -#else
>  		printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
>  				wandev->name);

The printk() also needs some updating.

>  		err = -EPROTONOSUPPORT;
>  		goto out;
> -#endif
>  	} else {
>  		dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
>  		err = -ENOBUFS;
> @@ -659,17 +641,9 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
>  	kfree(dev->priv);
>  	dev->priv = NULL;
>  
> -#ifdef CONFIG_WANPIPE_MULTPPP
> -	if (cnf->config_id == WANCONFIG_MPPP)
> -		kfree(pppdev);
> -	else
> -		kfree(dev);
> -#else
>  	/* Sync PPP is disabled */
>  	if (cnf->config_id != WANCONFIG_MPPP)
>  		kfree(dev);
> -#endif
> -
>  out:
>  	kfree(cnf);
>  	return err;
> 
> Krzysztof Halasa

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
  2008-07-02 20:17 ` Adrian Bunk
@ 2008-07-02 20:21   ` Krzysztof Halasa
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Halasa @ 2008-07-02 20:21 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: netdev, lkml

Adrian Bunk <bunk@kernel.org> writes:

>> -#ifdef CONFIG_WANPIPE_MULTPPP
>> -		pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL);
>> -		err = -ENOBUFS;
>> -		if (pppdev == NULL)
>> -			goto out;
>> -		pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
>> -		if (pppdev->dev == NULL) {
>> -			kfree(pppdev);
>> -			err = -ENOBUFS;
>> -			goto out;
>> -		}
>> -		err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
>> -		dev = pppdev->dev;
>> -#else
>>  		printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
>>  				wandev->name);
>
> The printk() also needs some updating.

Agreed.
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
  2008-07-02 19:12 WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist Krzysztof Halasa
  2008-07-02 20:17 ` Adrian Bunk
@ 2008-07-09 14:44 ` Lennart Sorensen
  2008-07-09 20:43   ` Krzysztof Halasa
  1 sibling, 1 reply; 6+ messages in thread
From: Lennart Sorensen @ 2008-07-09 14:44 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: netdev, lkml

On Wed, Jul 02, 2008 at 09:12:55PM +0200, Krzysztof Halasa wrote:
> For review only, the actual patch will be made available in git.
> 
> Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist

Does anyone use this ancient code anymore?  Sangoma has been maintaining
their drivers out of tree for years now and the leftover bits (from 2.2
or 2.4 days) really isn't interesting anymore as far as I can tell.
Maybe removal entirely is the correct clean up method.

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
  2008-07-09 14:44 ` Lennart Sorensen
@ 2008-07-09 20:43   ` Krzysztof Halasa
  2008-07-09 20:45     ` Lennart Sorensen
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Halasa @ 2008-07-09 20:43 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: Arnaldo Carvalho de Melo, netdev, lkml

lsorense@csclub.uwaterloo.ca (Lennart Sorensen) writes:

>> Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
>
> Does anyone use this ancient code anymore?  Sangoma has been maintaining
> their drivers out of tree for years now and the leftover bits (from 2.2
> or 2.4 days) really isn't interesting anymore as far as I can tell.
> Maybe removal entirely is the correct clean up method.

It seems Cyclades Cyclom 2X (ISA only?) cards use the wanpipe/wanrouter
thing for X.25. I don't know exact status, though.
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
  2008-07-09 20:43   ` Krzysztof Halasa
@ 2008-07-09 20:45     ` Lennart Sorensen
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Sorensen @ 2008-07-09 20:45 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: Arnaldo Carvalho de Melo, netdev, lkml

On Wed, Jul 09, 2008 at 10:43:37PM +0200, Krzysztof Halasa wrote:
> It seems Cyclades Cyclom 2X (ISA only?) cards use the wanpipe/wanrouter
> thing for X.25. I don't know exact status, though.

Oh OK,  Nifty.  I thought it was all just sangoma stuff, but I guess if
it's in the kernel there is no reason others couldn't use bits of it
too.  Hmm, maybe the sangoma specific stuff has already been cleaned up
then although that CONFIG_WANPIPE_MULTPPP is certainly one of their
bits.

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-09 20:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 19:12 WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist Krzysztof Halasa
2008-07-02 20:17 ` Adrian Bunk
2008-07-02 20:21   ` Krzysztof Halasa
2008-07-09 14:44 ` Lennart Sorensen
2008-07-09 20:43   ` Krzysztof Halasa
2008-07-09 20:45     ` Lennart Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).