public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 03/36] tty: remove dummy tty_ldisc_ops::poll() implementations
Date: Thu, 10 Aug 2023 11:14:37 +0200	[thread overview]
Message-ID: <20230810091510.13006-4-jirislaby@kernel.org> (raw)
In-Reply-To: <20230810091510.13006-1-jirislaby@kernel.org>

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>
---
 drivers/bluetooth/hci_ldisc.c | 7 -------
 drivers/net/ppp/ppp_async.c   | 8 --------
 drivers/net/ppp/ppp_synctty.c | 8 --------
 net/nfc/nci/uart.c            | 7 -------
 4 files changed, 30 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index a76eb98c0047..759472686831 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -819,12 +819,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,
@@ -835,7 +829,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,
 };
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 15a179631903..f420bddb6a8c 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -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,
 };
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index 18283b7b94bc..86dacef84c6c 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -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,
 };
diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c
index 082f94be0996..c8249d95306d 100644
--- a/net/nfc/nci/uart.c
+++ b/net/nfc/nci/uart.c
@@ -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,
-- 
2.41.0


  parent reply	other threads:[~2023-08-10  9:15 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  9:14 [PATCH 00/36] tty: type unifications -- part I Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 01/36] tty: xtensa/iss: drop unneeded tty_operations hooks Jiri Slaby (SUSE)
2023-08-10 12:37   ` Max Filippov
2023-08-10  9:14 ` [PATCH 02/36] tty: ldisc: document that ldops are optional Jiri Slaby (SUSE)
2023-08-10  9:14 ` Jiri Slaby (SUSE) [this message]
2023-08-10  9:14 ` [PATCH 04/36] tty: n_null: remove optional ldops Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 05/36] tty: change tty_write_lock()'s ndelay parameter to bool Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 06/36] tty: tty_port: rename 'disc' to 'ld' Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 07/36] tty: drop tty_debug_wait_until_sent() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 08/36] tty: make tty_change_softcar() more understandable Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 09/36] tty: make tty_port_client_operations operate with u8 Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 10/36] tty: make counts in tty_port_client_operations hooks size_t Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 11/36] tty: switch receive_buf() counts to size_t Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 12/36] tty: switch count in tty_ldisc_receive_buf() " Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 13/36] tty: can327: unify error paths in can327_ldisc_rx() Jiri Slaby (SUSE)
2023-08-11 21:32   ` Max Staudt
2023-08-10  9:14 ` [PATCH 14/36] tty: can327, move overflow test inside can327_ldisc_rx()'s loop Jiri Slaby (SUSE)
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 15/36] tty: make tty_ldisc_ops::*buf*() hooks operate on size_t Jiri Slaby (SUSE)
2023-08-10 12:02   ` Mark Brown
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 16/36] tty: use u8 for chars Jiri Slaby (SUSE)
2023-08-10 12:04   ` Mark Brown
2023-08-11 10:28   ` Ilpo Järvinen
2023-08-14  6:35     ` Jiri Slaby
2023-08-31 18:33     ` Andy Shevchenko
2023-08-11 21:34   ` Max Staudt
2023-08-10  9:14 ` [PATCH 17/36] tty: use u8 for flags Jiri Slaby (SUSE)
2023-08-10 12:05   ` Mark Brown
2023-08-11 21:35   ` Max Staudt
2023-08-10  9:14 ` [PATCH 18/36] misc: ti-st: make st_recv() conforming to tty_ldisc_ops::receive_buf() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 19/36] tty: make char_buf_ptr()/flag_buf_ptr()'s offset unsigned Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 20/36] tty: tty_buffer: make all offsets unsigned Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 21/36] tty: don't pass write() to do_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 22/36] tty: rename and de-inline do_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 23/36] tty: use min() in iterate_tty_write() Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 24/36] tty: use ssize_t for iterate_tty_read() returned type Jiri Slaby (SUSE)
2023-08-10  9:14 ` [PATCH 25/36] tty: switch size and count types in iterate_tty_read() to size_t Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 26/36] tty: use min() for size computation in iterate_tty_read() Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 27/36] tty: propagate u8 data to tty_operations::write() Jiri Slaby (SUSE)
2023-08-11 11:52   ` Alexander Gordeev
2023-08-17 10:42     ` Jiri Slaby
2023-08-14 14:47   ` Geert Uytterhoeven
2023-08-17 10:53   ` Alexander Gordeev
2023-08-10  9:15 ` [PATCH 28/36] tty: propagate u8 data to tty_operations::put_char() Jiri Slaby (SUSE)
2023-08-14 14:44   ` Geert Uytterhoeven
2023-08-17 10:55   ` Alexander Gordeev
2023-08-10  9:15 ` [PATCH 29/36] tty: make tty_operations::write()'s count size_t Jiri Slaby (SUSE)
2023-08-14 17:58   ` Geert Uytterhoeven
2023-08-10  9:15 ` [PATCH 30/36] tty: audit: unify to u8 Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 31/36] tty: ldops: " Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 32/36] tty: hvc: convert counts to size_t Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 33/36] tty: vcc: " Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 34/36] tty: gdm724x: " Jiri Slaby (SUSE)
2023-08-10  9:42   ` Dan Carpenter
2023-08-10 10:08     ` Jiri Slaby
2023-08-10 10:39     ` [PATCH 34-and-three-quarters/36] tty: gdm724x: simplify gdm_tty_write() Jiri Slaby (SUSE)
2023-08-11  9:11       ` Ilpo Järvinen
2023-08-15 17:22   ` [PATCH 34/36] tty: gdm724x: convert counts to size_t Nathan Chancellor
2023-08-16  6:46     ` Jiri Slaby
2023-08-16  8:40       ` David Laight
2023-08-16  8:58         ` Jiri Slaby
2023-08-16  9:18           ` David Laight
2023-08-10  9:15 ` [PATCH 35/36] tty: hso: simplify hso_serial_write() Jiri Slaby (SUSE)
2023-08-10  9:15 ` [PATCH 36/36] tty: rfcomm: convert counts to size_t Jiri Slaby (SUSE)
2023-08-11 10:26 ` [PATCH 00/36] tty: type unifications -- part I Ilpo Järvinen
2023-08-14  6:59   ` Jiri Slaby
2023-08-14 14:47     ` Ilpo Järvinen

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=20230810091510.13006-4-jirislaby@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan.hedberg@gmail.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pabeni@redhat.com \
    /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