From: Arnd Bergmann <arnd@arndb.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
gregkh@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 is defined
Date: Fri, 11 Mar 2011 15:54:38 +0100 [thread overview]
Message-ID: <201103111554.38487.arnd@arndb.de> (raw)
In-Reply-To: <20110311143010.3aef5873@lxorguk.ukuu.org.uk>
On Friday 11 March 2011, Alan Cox wrote:
> > or some variation of this. It's fine as long as this code never gets
> > called, but incorrect nonetheless.
>
> I disagree - the WARN(1) is certainly correct.
Yes. I wrote this before I saw your other reply where you suggest
the use of WARN_ON().
So while technically correct, I still tend to prefer build warnings
over run-time warnings for things that we know about at build time.
> > I think it would be much cleaner if architectures that cannot do this
> > would not have to define those functions and we could make sure that
> > all drivers that do inb() have correct Kconfig dependencies.
>
> For 8250 the way to do that is to remove all the switches and port type
> stuff and propogate to setting ->serial_in and ->serial_out rather than
> splattering the code with ifdefs. At that point you'd have a "lib8250" or
> similar and an 8250_io/pci driver.
Right, this absolutely makes sense. It's a lot more work than the originally
suggested patch, but the result is much cleaner.
Arnd
prev parent reply other threads:[~2011-03-11 14:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 12:58 [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 is defined Nobuhiro Iwamatsu
2011-03-11 12:58 ` [PATCH 2/3] tty: serial: Fix build on architecture that does not have ioport Nobuhiro Iwamatsu
2011-03-11 13:54 ` Alan Cox
2011-03-11 14:16 ` Arnd Bergmann
2011-03-11 12:58 ` [PATCH 3/3] tty: serial: Check UPF_FOURPORT, when CONFIG_SERIAL_8250_FOURPORT is defined Nobuhiro Iwamatsu
2011-03-11 13:55 ` Alan Cox
2011-03-11 13:50 ` [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 " Alan Cox
2011-03-11 13:56 ` Arnd Bergmann
2011-03-11 14:30 ` Alan Cox
2011-03-11 14:54 ` Arnd Bergmann [this message]
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=201103111554.38487.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nobuhiro.iwamatsu.yj@renesas.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 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.