mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tty: define hung_up_tty_compat_ioctl with CONFIG_COMPAT
@ 2023-05-01  2:56 Tom Rix
  2023-05-02  5:02 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-05-01  2:56 UTC (permalink / raw)
  To: gregkh, jirislaby; +Cc: linux-kernel, Tom Rix

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


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

end of thread, other threads:[~2023-05-02  5:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01  2:56 [PATCH] tty: define hung_up_tty_compat_ioctl with CONFIG_COMPAT Tom Rix
2023-05-02  5:02 ` Jiri Slaby

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®