mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-kernel@vger.kernel.org, Tom Rix <trix@redhat.com>
Subject: [PATCH] tty: define hung_up_tty_compat_ioctl with CONFIG_COMPAT
Date: Sun, 30 Apr 2023 22:56:02 -0400	[thread overview]
Message-ID: <20230501025602.2905173-1-trix@redhat.com> (raw)

gcc reports
drivers/tty/tty_io.c:446:13: error: ‘hung_up_tty_compat_ioctl’
  defined but not used [-Werror=unused-function]
  446 | static long hung_up_tty_compat_ioctl(struct file *file,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~

hung_up_tty_compat_ioctl is used conditionally with CONFIG_COMPAT,
so it should be likewise defined.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/tty/tty_io.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 553182753098..7fe404d56ce7 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -443,11 +443,13 @@ static long hung_up_tty_ioctl(struct file *file, unsigned int cmd,
 	return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
 }
 
+#ifdef CONFIG_COMPAT
 static long hung_up_tty_compat_ioctl(struct file *file,
 				     unsigned int cmd, unsigned long arg)
 {
 	return cmd == TIOCSPGRP ? -ENOTTY : -EIO;
 }
+#endif
 
 static int hung_up_tty_fasync(int fd, struct file *file, int on)
 {
-- 
2.27.0


             reply	other threads:[~2023-05-01  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01  2:56 Tom Rix [this message]
2023-05-02  5:02 ` Jiri Slaby

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=20230501025602.2905173-1-trix@redhat.com \
    --to=trix@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®