lkml.org 
[lkml]   [2011]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 is defined
Date
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


\
 
 \ /
  Last update: 2011-03-11 15:57    [W:0.033 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site