From: Filip Jensen <dev-Felipe.Jensen@duagon.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Filip Jensen <dev-Felipe.Jensen@duagon.com>,
Jose Javier Rodriguez Barbarin
<dev-josejavier.rodriguez@duagon.com>
Subject: [PATCH 1/2] serial: 8250_men_mcb: Clean defines
Date: Wed, 10 Dec 2025 17:48:03 +0100 [thread overview]
Message-ID: <20251210164804.94801-2-dev-Felipe.Jensen@duagon.com> (raw)
In-Reply-To: <20251210164804.94801-1-dev-Felipe.Jensen@duagon.com>
The Z125 define is not used anywhere, thus removed. Also used a
more specific name for the maximum number of ports per unit and
removed the duplicated define MAX_PORTS
Reviewed-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
Signed-off-by: Filip Jensen <dev-Felipe.Jensen@duagon.com>
---
drivers/tty/serial/8250/8250_men_mcb.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_men_mcb.c b/drivers/tty/serial/8250/8250_men_mcb.c
index a78ef35c8187..6ba7464bb2dd 100644
--- a/drivers/tty/serial/8250/8250_men_mcb.c
+++ b/drivers/tty/serial/8250/8250_men_mcb.c
@@ -28,8 +28,6 @@
#define MEN_UART3_MASK 0x04
#define MEN_UART4_MASK 0x08
-#define MEN_Z125_UARTS_AVAILABLE 0x01
-
#define MEN_Z025_MAX_UARTS 4
#define MEN_UART_MEM_SIZE 0x10
#define MEM_UART_REGISTER_SIZE 0x01
@@ -42,12 +40,10 @@
#define MEN_READ_REGISTER(addr) readb(addr)
-#define MAX_PORTS 4
-
struct serial_8250_men_mcb_data {
int num_ports;
- int line[MAX_PORTS];
- unsigned int offset[MAX_PORTS];
+ int line[MEN_Z025_MAX_UARTS];
+ unsigned int offset[MEN_Z025_MAX_UARTS];
};
/*
@@ -126,7 +122,7 @@ static int read_serial_data(struct mcb_device *mdev,
if (res < 0)
return res;
- for (i = 0; i < MAX_PORTS; i++) {
+ for (i = 0; i < MEN_Z025_MAX_UARTS; i++) {
mask = 0x1 << i;
switch (uarts_available & mask) {
case MEN_UART1_MASK:
@@ -150,7 +146,7 @@ static int read_serial_data(struct mcb_device *mdev,
}
}
- if (count <= 0 || count > MAX_PORTS) {
+ if (count <= 0 || count > MEN_Z025_MAX_UARTS) {
dev_err(&mdev->dev, "unexpected number of ports: %u\n",
count);
return -ENODEV;
--
2.34.1
next prev parent reply other threads:[~2025-12-10 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 16:48 [PATCH 0/2] serial: 8250_men_mcb: Parameter for base clock rate Filip Jensen
2025-12-10 16:48 ` Filip Jensen [this message]
2025-12-10 16:48 ` [PATCH 2/2] serial: 8250_men_mcb: Parameter for base clockrate Filip Jensen
2025-12-17 14:00 ` 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=20251210164804.94801-2-dev-Felipe.Jensen@duagon.com \
--to=dev-felipe.jensen@duagon.com \
--cc=dev-josejavier.rodriguez@duagon.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.