mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Make pty_driver and pty_slave_driver local vars in legacy BSD pty code
@ 2009-09-30 10:01 David Howells
  2009-09-30 15:08 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2009-09-30 10:01 UTC (permalink / raw)
  To: torvalds, akpm, gregkh; +Cc: alan, linux-kernel, David Howells

Make the pty_driver and pty_slave_driver global variables into local vars of
legacy_pty_init() as that's the only thing that ever accesses the values.

Signed-off-by: David Howells <dhowells@redhat.com>
---

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


diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 53761ce..6fe1f07 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -326,8 +326,6 @@ static const struct tty_operations pty_ops = {
 
 /* Traditional BSD devices */
 #ifdef CONFIG_LEGACY_PTYS
-static struct tty_driver *pty_driver, *pty_slave_driver;
-
 static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file,
 			 unsigned int cmd, unsigned long arg)
 {
@@ -356,6 +354,8 @@ static const struct tty_operations pty_ops_bsd = {
 
 static void __init legacy_pty_init(void)
 {
+	struct tty_driver *pty_driver, *pty_slave_driver;
+
 	if (legacy_count <= 0)
 		return;
 


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

* Re: [PATCH] Make pty_driver and pty_slave_driver local vars in legacy BSD pty code
  2009-09-30 10:01 [PATCH] Make pty_driver and pty_slave_driver local vars in legacy BSD pty code David Howells
@ 2009-09-30 15:08 ` Linus Torvalds
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2009-09-30 15:08 UTC (permalink / raw)
  To: David Howells; +Cc: akpm, gregkh, alan, linux-kernel



On Wed, 30 Sep 2009, David Howells wrote:
>
> Make the pty_driver and pty_slave_driver global variables into local vars of
> legacy_pty_init() as that's the only thing that ever accesses the values.

I had already done this in my local tree due to the other thread about the 
whole broken legacy pty initialization. Committed that and pushed out.

		Linus

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

end of thread, other threads:[~2009-09-30 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-30 10:01 [PATCH] Make pty_driver and pty_slave_driver local vars in legacy BSD pty code David Howells
2009-09-30 15:08 ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®