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>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: [PATCH 04/13] serial: remove quot_frac from serial8250_do_set_divisor()
Date: Mon,  5 Aug 2024 12:20:37 +0200	[thread overview]
Message-ID: <20240805102046.307511-5-jirislaby@kernel.org> (raw)
In-Reply-To: <20240805102046.307511-1-jirislaby@kernel.org>

quot_frac is unused in serial8250_do_set_divisor() since commit
b2b4b8ed3c06 (serial: 8250_exar: Move custom divisor support out from
8250_port). So no point to pass it.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/8250/8250_dwlib.c | 2 +-
 drivers/tty/serial/8250/8250_exar.c  | 2 +-
 drivers/tty/serial/8250/8250_pci.c   | 2 +-
 drivers/tty/serial/8250/8250_port.c  | 4 ++--
 include/linux/serial_8250.h          | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dwlib.c b/drivers/tty/serial/8250/8250_dwlib.c
index 5a2520943dfd..b055d89cfb39 100644
--- a/drivers/tty/serial/8250/8250_dwlib.c
+++ b/drivers/tty/serial/8250/8250_dwlib.c
@@ -89,7 +89,7 @@ static void dw8250_set_divisor(struct uart_port *p, unsigned int baud,
 			       unsigned int quot, unsigned int quot_frac)
 {
 	dw8250_writel_ext(p, DW_UART_DLF, quot_frac);
-	serial8250_do_set_divisor(p, baud, quot, quot_frac);
+	serial8250_do_set_divisor(p, baud, quot);
 }
 
 void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios,
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 616128254bbd..b7a75db15249 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -500,7 +500,7 @@ static unsigned int xr17v35x_get_divisor(struct uart_port *p, unsigned int baud,
 static void xr17v35x_set_divisor(struct uart_port *p, unsigned int baud,
 				 unsigned int quot, unsigned int quot_frac)
 {
-	serial8250_do_set_divisor(p, baud, quot, quot_frac);
+	serial8250_do_set_divisor(p, baud, quot);
 
 	/* Preserve bits not related to baudrate; DLD[7:4]. */
 	quot_frac |= serial_port_in(p, 0x2) & 0xf0;
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index e1d7aa2fa347..6709b6a5f301 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1277,7 +1277,7 @@ static void pci_oxsemi_tornado_set_divisor(struct uart_port *port,
 	serial_icr_write(up, UART_TCR, tcr);
 	serial_icr_write(up, UART_CPR, cpr);
 	serial_icr_write(up, UART_CKS, cpr2);
-	serial8250_do_set_divisor(port, baud, quot, 0);
+	serial8250_do_set_divisor(port, baud, quot);
 }
 
 /*
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 2786918aea98..3509af7dc52b 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2609,7 +2609,7 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up,
 }
 
 void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
-			       unsigned int quot, unsigned int quot_frac)
+			       unsigned int quot)
 {
 	struct uart_8250_port *up = up_to_u8250p(port);
 
@@ -2641,7 +2641,7 @@ static void serial8250_set_divisor(struct uart_port *port, unsigned int baud,
 	if (port->set_divisor)
 		port->set_divisor(port, baud, quot, quot_frac);
 	else
-		serial8250_do_set_divisor(port, baud, quot, quot_frac);
+		serial8250_do_set_divisor(port, baud, quot);
 }
 
 static unsigned int serial8250_get_baud_rate(struct uart_port *port,
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index fd59ed2cca53..e0717c8393d7 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -193,7 +193,7 @@ void serial8250_do_pm(struct uart_port *port, unsigned int state,
 		      unsigned int oldstate);
 void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl);
 void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
-			       unsigned int quot, unsigned int quot_frac);
+			       unsigned int quot);
 int fsl8250_handle_irq(struct uart_port *port);
 int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
 u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr);
-- 
2.46.0


  parent reply	other threads:[~2024-08-05 10:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 10:20 [PATCH 00/13] tty: random fixes and cleanups Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 01/13] tty: simplify tty_dev_name_to_number() using guard(mutex) Jiri Slaby (SUSE)
2024-08-05 14:25   ` Ilpo Järvinen
2024-08-05 10:20 ` [PATCH 02/13] serial: protect uart_port_dtr_rts() in uart_shutdown() too Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 03/13] serial: don't use uninitialized value in uart_poll_init() Jiri Slaby (SUSE)
2024-08-05 14:28   ` Ilpo Järvinen
2024-08-05 15:46     ` Doug Anderson
2024-08-08  7:34       ` Jiri Slaby
2024-08-08  7:44         ` Greg Kroah-Hartman
2024-08-08  9:15         ` Ilpo Järvinen
2024-08-05 15:43   ` Doug Anderson
2024-08-05 10:20 ` Jiri Slaby (SUSE) [this message]
2024-08-05 10:20 ` [PATCH 05/13] serial: use guards for simple mutex locks Jiri Slaby (SUSE)
2024-08-05 17:57   ` kernel test robot
2024-08-05 18:09   ` kernel test robot
2024-08-07 11:15   ` Greg KH
2024-08-05 10:20 ` [PATCH 06/13] mxser: remove stale comment Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 07/13] mxser: remove doubled sets of close times Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 08/13] mctp: serial: propagage new tty types Jiri Slaby (SUSE)
2024-08-06  4:51   ` Jeremy Kerr
2024-08-08 10:35     ` Jiri Slaby
2024-08-05 10:20 ` [PATCH 09/13] 6pack: remove sixpack::rbuff Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 10/13] 6pack: drop sixpack::mtu Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 11/13] 6pack: drop sixpack::buffsize Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 12/13] 6pack: remove global strings Jiri Slaby (SUSE)
2024-08-05 10:20 ` [PATCH 13/13] 6pack: propagage new tty types Jiri Slaby (SUSE)
2024-08-07 11:14 ` [PATCH 00/13] tty: random fixes and cleanups Greg KH

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=20240805102046.307511-5-jirislaby@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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