From: Adrian Bunk <bunk@kernel.org>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: netdev@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: WAN: Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
Date: Wed, 2 Jul 2008 23:17:55 +0300 [thread overview]
Message-ID: <20080702201754.GA2145@cs181140183.pp.htv.fi> (raw)
In-Reply-To: <m3r6ac3xs8.fsf@maximus.localdomain>
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
next prev parent reply other threads:[~2008-07-02 20:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20080702201754.GA2145@cs181140183.pp.htv.fi \
--to=bunk@kernel.org \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 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).