mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org, gregkh@suse.de
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
	David Howells <dhowells@redhat.com>
Subject: [PATCH] Remove pty_ops_bsd and pty_bsd_ioctl() as they're not used
Date: Mon, 28 Sep 2009 14:53:32 +0100	[thread overview]
Message-ID: <20090928135332.4300.56046.stgit@warthog.procyon.org.uk> (raw)

Remove pty_ops_bsd as nothing appears to use it anymore.  It results in the
following warning:

	drivers/char/pty.c:344: warning: unused variable `pty_ops_bsd'

if CONFIG_LEGACY_PTYS=y.

Also remove pty_bsd_ioctl() as that's only referred to by pty_ops_bsd.

Possibly legacy_pty_init() should be passing this to tty_set_operations()
rather than pty_ops.

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

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


diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 53761ce..175f805 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -328,32 +328,9 @@ static const struct tty_operations pty_ops = {
 #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)
-{
-	switch (cmd) {
-	case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */
-		return pty_set_lock(tty, (int __user *) arg);
-	}
-	return -ENOIOCTLCMD;
-}
-
 static int legacy_count = CONFIG_LEGACY_PTY_COUNT;
 module_param(legacy_count, int, 0);
 
-static const struct tty_operations pty_ops_bsd = {
-	.open = pty_open,
-	.close = pty_close,
-	.write = pty_write,
-	.write_room = pty_write_room,
-	.flush_buffer = pty_flush_buffer,
-	.chars_in_buffer = pty_chars_in_buffer,
-	.unthrottle = pty_unthrottle,
-	.set_termios = pty_set_termios,
-	.ioctl = pty_bsd_ioctl,
-	.resize = pty_resize
-};
-
 static void __init legacy_pty_init(void)
 {
 	if (legacy_count <= 0)


             reply	other threads:[~2009-09-28 13:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 13:53 David Howells [this message]
2009-09-28 14:16 ` Alan Cox
2009-09-28 14:55   ` Linus Torvalds
2009-09-29 15:55   ` David Howells
2009-09-29 16:23     ` Linus Torvalds
2009-09-29 16:38       ` Linus Torvalds
2009-09-29 18:40       ` David Howells
2009-09-29 22:39         ` Alan Cox
2009-09-30 10:20     ` David Howells
2009-09-30 11:28       ` Alan Cox
2009-09-28 14:55 ` David Howells
2009-09-28 15:25   ` Alan Cox

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=20090928135332.4300.56046.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®