2003-06-19 22:58:32

by Adrian Bunk

[permalink] [raw]
Subject: [2.5 patch] remove two unused variables from mxser.c

The patch below removes two unused variables from drivers/char/mxser.c .

I've tested the compilation with 2.5.72 and 2.5.72-mm2.

Please apply
Adrian

--- linux-2.5.72-mm2/drivers/char/mxser.c.old 2003-06-20 01:07:39.000000000 +0200
+++ linux-2.5.72-mm2/drivers/char/mxser.c 2003-06-20 01:08:03.000000000 +0200
@@ -498,7 +498,6 @@
{
int i, m, retval, b;
int n, index;
- int ret1, ret2;
struct mxser_hwconf hwconf;

mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1);


2003-06-20 04:55:51

by Rusty Russell

[permalink] [raw]
Subject: Re: [2.5 patch] remove two unused variables from mxser.c

In message <[email protected]> you write:
> The patch below removes two unused variables from drivers/char/mxser.c .

While you're there, would you fix the init returning "-1" for no good
reason at the bottom, too? (I don't think they really meant EPERM).

Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

2003-06-28 02:25:24

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.5 patch] remove two unused variables from mxser.c

On Fri, Jun 20, 2003 at 02:31:06PM +1000, Rusty Russell wrote:
> In message <[email protected]> you write:
> > The patch below removes two unused variables from drivers/char/mxser.c .
>
> While you're there, would you fix the init returning "-1" for no good
> reason at the bottom, too? (I don't think they really meant EPERM).

There is at least one other driver under drivers/char/ doing the
same...

Which return code do you suggest?

> Thanks,
> Rusty.

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

2003-06-30 02:43:43

by Rusty Russell

[permalink] [raw]
Subject: Re: [2.5 patch] remove two unused variables from mxser.c

In message <[email protected]> you write:
> On Fri, Jun 20, 2003 at 02:31:06PM +1000, Rusty Russell wrote:
> > In message <[email protected]> you write:
> > > The patch below removes two unused variables from drivers/char/mxser.c .
> >
> > While you're there, would you fix the init returning "-1" for no good
> > reason at the bottom, too? (I don't think they really meant EPERM).
>
> There is at least one other driver under drivers/char/ doing the
> same...
>
> Which return code do you suggest?

Looking at the code, there are other problems.

The last thing to fail (which triggers this -1 return) is
tty_register_driver(mxvar_sdriver): so keep that return code and use
it.

But they do put_tty_driver(mxvar_sdriver) in the failure path, which
seems wrong, too...

Good luck!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.