tty: remove dummy tty_ldisc_ops::poll() implementations
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 10 Aug 2023 09:14:37 +0000 (11:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 19:12:44 +0000 (21:12 +0200)
tty_ldisc_ops::poll() is optional and needs not be provided. It is equal
to returning 0. So remove all those from the code.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091510.13006-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/hci_ldisc.c
drivers/net/ppp/ppp_async.c
drivers/net/ppp/ppp_synctty.c
net/nfc/nci/uart.c

index efdda2c..5224b09 100644 (file)
@@ -818,12 +818,6 @@ static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
        return 0;
 }
 
-static __poll_t hci_uart_tty_poll(struct tty_struct *tty,
-                                     struct file *filp, poll_table *wait)
-{
-       return 0;
-}
-
 static struct tty_ldisc_ops hci_uart_ldisc = {
        .owner          = THIS_MODULE,
        .num            = N_HCI,
@@ -834,7 +828,6 @@ static struct tty_ldisc_ops hci_uart_ldisc = {
        .write          = hci_uart_tty_write,
        .ioctl          = hci_uart_tty_ioctl,
        .compat_ioctl   = hci_uart_tty_ioctl,
-       .poll           = hci_uart_tty_poll,
        .receive_buf    = hci_uart_tty_receive,
        .write_wakeup   = hci_uart_tty_wakeup,
 };
index 15a1796..f420bdd 100644 (file)
@@ -328,13 +328,6 @@ ppp_asynctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
        return err;
 }
 
-/* No kernel lock - fine */
-static __poll_t
-ppp_asynctty_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
-{
-       return 0;
-}
-
 /* May sleep, don't call from interrupt level or with interrupts disabled */
 static void
 ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
@@ -378,7 +371,6 @@ static struct tty_ldisc_ops ppp_ldisc = {
        .read   = ppp_asynctty_read,
        .write  = ppp_asynctty_write,
        .ioctl  = ppp_asynctty_ioctl,
-       .poll   = ppp_asynctty_poll,
        .receive_buf = ppp_asynctty_receive,
        .write_wakeup = ppp_asynctty_wakeup,
 };
index 18283b7..86dacef 100644 (file)
@@ -321,13 +321,6 @@ ppp_synctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
        return err;
 }
 
-/* No kernel lock - fine */
-static __poll_t
-ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
-{
-       return 0;
-}
-
 /* May sleep, don't call from interrupt level or with interrupts disabled */
 static void
 ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
@@ -371,7 +364,6 @@ static struct tty_ldisc_ops ppp_sync_ldisc = {
        .read   = ppp_sync_read,
        .write  = ppp_sync_write,
        .ioctl  = ppp_synctty_ioctl,
-       .poll   = ppp_sync_poll,
        .receive_buf = ppp_sync_receive,
        .write_wakeup = ppp_sync_wakeup,
 };
index 082f94b..c8249d9 100644 (file)
@@ -357,12 +357,6 @@ static ssize_t nci_uart_tty_write(struct tty_struct *tty, struct file *file,
        return 0;
 }
 
-static __poll_t nci_uart_tty_poll(struct tty_struct *tty,
-                                     struct file *filp, poll_table *wait)
-{
-       return 0;
-}
-
 static int nci_uart_send(struct nci_uart *nu, struct sk_buff *skb)
 {
        /* Queue TX packet */
@@ -435,7 +429,6 @@ static struct tty_ldisc_ops nci_uart_ldisc = {
        .close          = nci_uart_tty_close,
        .read           = nci_uart_tty_read,
        .write          = nci_uart_tty_write,
-       .poll           = nci_uart_tty_poll,
        .receive_buf    = nci_uart_tty_receive,
        .write_wakeup   = nci_uart_tty_wakeup,
        .ioctl          = nci_uart_tty_ioctl,