From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"Arnd Bergmann" <arnd@arndb.de>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev
Subject: Re: [PATCH 1/2] tty: serial: remove hub6 multiport support
Date: Mon, 19 Oct 2026 11:12:56 +0300 [thread overview]
Message-ID: <atXRCJjQGcSKZ_X3@ashevche-desk.local> (raw)
In-Reply-To: <20261016124839.0d5564f7d7e036ee782a0486@hugovil.com>
On Fri, Oct 16, 2026 at 12:48:39PM -0400, Hugo Villeneuve wrote:
> On Fri, 16 Oct 2026 14:59:47 +0200
> Arnd Bergmann <arnd@kernel.org> wrote:
...
> > switch (up->port.iotype) {
> > - case UPIO_HUB6:
> > - outb(up->port.hub6 - 1 + offset, up->port.iobase);
> > - return inb(up->port.iobase + 1);
> > -
> > case UPIO_MEM:
> > return readb(up->port.membase + offset);
>
> Maybe change to a simple if/else?
>
> if (up->port.iotype == UPIO_MEM)
> return readb(up->port.membase + offset);
> else
> return inb(up->port.iobase + offset);
While it may work, I would still leave a possibility of the default case, but
Ideally this should be a simple callback level change, so it will be checked
only once at the probe time or so.
...
> > offset <<= up->port.regshift;
> >
> > switch (up->port.iotype) {
> > - case UPIO_HUB6:
> > - outb(up->port.hub6 - 1 + offset, up->port.iobase);
> > - outb(value, up->port.iobase + 1);
> > - break;
> > -
> > case UPIO_MEM:
> > writeb(value, up->port.membase + offset);
> > break;
>
> Similar here:
>
> if (up->port.iotype == UPIO_MEM)
> writeb(value, up->port.membase + offset);
> else
> outb(value, up->port.iobase + offset);
Same here, see how we assign the respective callbacks in the 8250, for instance.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-10-19 8:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 12:59 [PATCH 1/2] tty: serial: remove hub6 multiport support Arnd Bergmann
2026-10-16 12:59 ` [PATCH 2/2] [v2] serial: 8250: remove obsolete and broken PORT_RSA support Arnd Bergmann
2026-10-16 13:14 ` Arnd Bergmann
2026-10-16 13:28 ` [PATCH 1/2] tty: serial: remove hub6 multiport support Andy Shevchenko
2026-10-16 14:41 ` Arnd Bergmann
2026-10-16 13:32 ` Andy Shevchenko
2026-10-16 14:10 ` Hugo Villeneuve
2026-10-16 15:56 ` Hugo Villeneuve
2026-10-16 16:16 ` Arnd Bergmann
2026-10-16 17:17 ` Hugo Villeneuve
2026-10-16 16:48 ` Hugo Villeneuve
2026-10-16 17:12 ` Arnd Bergmann
2026-10-16 17:16 ` Hugo Villeneuve
2026-10-19 8:12 ` Andy Shevchenko [this message]
2026-10-16 18:28 ` Frank Li
2026-10-19 7:51 ` Uwe Kleine-König
2026-10-19 8:38 ` Andy Shevchenko
2026-10-19 8:51 ` Arnd Bergmann
2026-10-19 8:15 ` Jiri Slaby
2026-10-19 9:09 ` Arnd Bergmann
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=atXRCJjQGcSKZ_X3@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hugo@hugovil.com \
--cc=hvilleneuve@dimonoff.com \
--cc=imx@lists.linux.dev \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.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