Re: linux-2.3.41/drivers/char/mxser.c does not compile

From: Theodore Y. Ts'o (tytso@MIT.EDU)
Date: Tue Feb 08 2000 - 12:24:15 EST


   Date: Sun, 6 Feb 2000 16:08:45 +0000 (GMT)
   From: Alan Cox <alan@lxorguk.ukuu.org.uk>

> linux-2.3.41/drivers/char/mxser.c does not compile, because it uses
> some private declarations in <linux/serialP.h> that are no longer
> pulled in, such as SERIAL_XMIT_SIZE and struct asnc_icount. I can
> send you a patch to make it compile by including <linux/serialP.h>,
> although I am not sure if this is correct, because I am not quite
> sure of the purpose of the <linux/serialP.h> file.

   Just reverse the pieces that Ted keeps trying to move into the private
   header and put them back. This is not the first time this has happened
   and its beginning to annoy me

It's very simple. Those definitions are private definitions, and have
nothing to do with the exported interface to userland. As such, they
don't belong in serial.h. If driver authors want to "borrow" huge
amounts of the serial driver code by doing code reuse by cut-and-paste,
they should #include serialP.h, which is a private header file for
non-exported #defines and structures.

In the long-term, the kind of functionality should be moved into the
high-level tty layer, so there isn't the need to share code by cutting
and pasting from serial.c. This approach isn't a good one in the long
term, since I've in the past fixed bugs in serial.c that don't get fixed
in other drivers that have borrowed huge amounts of code from serial.c
--- in many cases, I have no idea they've borrowed code, so I couldn't
notify them even if I had the time to track all of the places that have
borrowed from serial.c

The other solution (for now) is to use the generic_serial.c by
R.E.Wolff@BitWizard.nl, but I don't personally like that approach since
it introduces yet another abstraction layer, when in fact most of this
functionality should be going into the tty layer.

                                                        - Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:13 EST