linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: Remove bogons from the iSeries console
@ 2008-08-06 13:06 Alan Cox
  2008-08-06 14:10 ` Stephen Rothwell
  2008-08-06 23:43 ` Paul Mackerras
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Cox @ 2008-08-06 13:06 UTC (permalink / raw)
  To: torvalds, devilbis, boutcher, linuxppc-dev

The iSeries driver calls into the n_tty ldisc code directly for some
bizarre reason. I previously tagged this with a query but this actually
does need fixing as n_tty methods when you have a different ldisc set are
not a good thing to call.

In n_tty mode this change should have no effect, the core tty layer has
always called the ldisc ioctl method *anyway* and will call the one for
the right ldisc.

Signed-off-by: Alan Cox <alan@redhat.com>

---

 drivers/char/viocons.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)


diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 65fb848..f48892b 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -705,10 +705,6 @@ static int viotty_ioctl(struct tty_struct *tty, struct file *file,
 	case KDSKBLED:
 		return 0;
 	}
-	/* FIXME: WTF is this being called for ??? */
-	lock_kernel();
-	ret =  n_tty_ioctl(tty, file, cmd, arg);
-	unlock_kernel();
 	return ret;
 }
 

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

* Re: [PATCH]: Remove bogons from the iSeries console
  2008-08-06 13:06 [PATCH]: Remove bogons from the iSeries console Alan Cox
@ 2008-08-06 14:10 ` Stephen Rothwell
  2008-08-06 16:57   ` Adrian Bunk
  2008-08-06 23:43 ` Paul Mackerras
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-08-06 14:10 UTC (permalink / raw)
  To: Alan Cox; +Cc: boutcher, linuxppc-dev, torvalds, devilbis

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

Hi Alan,

On Wed, 6 Aug 2008 14:06:29 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> The iSeries driver calls into the n_tty ldisc code directly for some
> bizarre reason. I previously tagged this with a query but this actually
> does need fixing as n_tty methods when you have a different ldisc set are
> not a good thing to call.
> 
> In n_tty mode this change should have no effect, the core tty layer has
> always called the ldisc ioctl method *anyway* and will call the one for
> the right ldisc.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

I will take your word for it as I have no idea.  This driver needs to be
deprecated anyway (in favour of hcv_iseries).

You may consider this
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
as defacto iSeries maintainer.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH]: Remove bogons from the iSeries console
  2008-08-06 14:10 ` Stephen Rothwell
@ 2008-08-06 16:57   ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-08-06 16:57 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: boutcher, linuxppc-dev, torvalds, devilbis, Alan Cox

On Thu, Aug 07, 2008 at 12:10:06AM +1000, Stephen Rothwell wrote:
> Hi Alan,
> 
> On Wed, 6 Aug 2008 14:06:29 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >
> > The iSeries driver calls into the n_tty ldisc code directly for some
> > bizarre reason. I previously tagged this with a query but this actually
> > does need fixing as n_tty methods when you have a different ldisc set are
> > not a good thing to call.
> > 
> > In n_tty mode this change should have no effect, the core tty layer has
> > always called the ldisc ioctl method *anyway* and will call the one for
> > the right ldisc.
> > 
> > Signed-off-by: Alan Cox <alan@redhat.com>
> 
> I will take your word for it as I have no idea.  This driver needs to be
> deprecated anyway (in favour of hcv_iseries).
>...

You already marked it as "Obsolete" more than 2 years ago, and due the 
kconfig dependencies most people anyway won't even see the option (since 
they have HVC_ISERIES enabled).

IMHO a candidate for a straight removal?

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: [PATCH]: Remove bogons from the iSeries console
  2008-08-06 23:43 ` Paul Mackerras
@ 2008-08-06 23:35   ` Alan Cox
  2008-08-07  0:44   ` Linus Torvalds
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Cox @ 2008-08-06 23:35 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: boutcher, linuxppc-dev, torvalds, devilbis

On Thu, 7 Aug 2008 09:43:28 +1000
Paul Mackerras <paulus@samba.org> wrote:

> Alan Cox writes:
> 
> > --- a/drivers/char/viocons.c
> > +++ b/drivers/char/viocons.c
> > @@ -705,10 +705,6 @@ static int viotty_ioctl(struct tty_struct *tty, struct file *file,
> >  	case KDSKBLED:
> >  		return 0;
> >  	}
> > -	/* FIXME: WTF is this being called for ??? */
> > -	lock_kernel();
> > -	ret =  n_tty_ioctl(tty, file, cmd, arg);
> > -	unlock_kernel();
> >  	return ret;
> >  }
> 
> I think you want "return -ENOIOCTLCMD" rather than "return ret" since
> ret is uninitialized with your patch applied.  I agree the call to
> n_tty_ioctl is bogus but I think we just want to return -ENOIOCTLCMD.

Agreed

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

* Re: [PATCH]: Remove bogons from the iSeries console
  2008-08-06 13:06 [PATCH]: Remove bogons from the iSeries console Alan Cox
  2008-08-06 14:10 ` Stephen Rothwell
@ 2008-08-06 23:43 ` Paul Mackerras
  2008-08-06 23:35   ` Alan Cox
  2008-08-07  0:44   ` Linus Torvalds
  1 sibling, 2 replies; 6+ messages in thread
From: Paul Mackerras @ 2008-08-06 23:43 UTC (permalink / raw)
  To: Alan Cox; +Cc: boutcher, linuxppc-dev, torvalds, devilbis

Alan Cox writes:

> --- a/drivers/char/viocons.c
> +++ b/drivers/char/viocons.c
> @@ -705,10 +705,6 @@ static int viotty_ioctl(struct tty_struct *tty, struct file *file,
>  	case KDSKBLED:
>  		return 0;
>  	}
> -	/* FIXME: WTF is this being called for ??? */
> -	lock_kernel();
> -	ret =  n_tty_ioctl(tty, file, cmd, arg);
> -	unlock_kernel();
>  	return ret;
>  }

I think you want "return -ENOIOCTLCMD" rather than "return ret" since
ret is uninitialized with your patch applied.  I agree the call to
n_tty_ioctl is bogus but I think we just want to return -ENOIOCTLCMD.

Paul.

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

* Re: [PATCH]: Remove bogons from the iSeries console
  2008-08-06 23:43 ` Paul Mackerras
  2008-08-06 23:35   ` Alan Cox
@ 2008-08-07  0:44   ` Linus Torvalds
  1 sibling, 0 replies; 6+ messages in thread
From: Linus Torvalds @ 2008-08-07  0:44 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: boutcher, linuxppc-dev, torvalds, devilbis, Alan Cox



On Thu, 7 Aug 2008, Paul Mackerras wrote:
> 
> I think you want "return -ENOIOCTLCMD" rather than "return ret" since
> ret is uninitialized with your patch applied.

Actually, nobody has apparently ever even tried compiling that function 
even before. 

Yes, 'ret' became uninitialized, but since it was never declared, it 
doesn't matter - it wouldn't compile anyway.

> I agree the call to n_tty_ioctl is bogus but I think we just want to 
> return -ENOIOCTLCMD.

I made that change, and in the spirit of that file I also didn't even try 
to compile it. So if the end result sexually assaults your pets, don't 
blame me. 

			Linus

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

end of thread, other threads:[~2008-08-07  0:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 13:06 [PATCH]: Remove bogons from the iSeries console Alan Cox
2008-08-06 14:10 ` Stephen Rothwell
2008-08-06 16:57   ` Adrian Bunk
2008-08-06 23:43 ` Paul Mackerras
2008-08-06 23:35   ` Alan Cox
2008-08-07  0:44   ` Linus Torvalds

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).