On Mon, Dec 28, 2020 at 03:49:35PM +0100, Jan Klemkow wrote: > The following diff removes useless double calls of ttyopen. l_open is > a pointer to ttyopen(). All other serial drivers also just use l_open, > as it is the general API for this. I'm not familiar with the subsystem/API, but one thing looks off to me.
> Index: dev/pci/cz.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/cz.c,v > retrieving revision 1.24 > diff -u -p -r1.24 cz.c > --- dev/pci/cz.c 21 May 2020 09:31:59 -0000 1.24 > +++ dev/pci/cz.c 28 Dec 2020 14:41:30 -0000 > @@ -1034,10 +1034,6 @@ czttyopen(dev_t dev, int flags, int mode > > splx(s); > > - error = ttyopen(CZTTY_DIALOUT(dev), tp, p); > - if (error) > - goto bad; > - > error = (*linesw[tp->t_line].l_open)(dev, tp, p); Is `CZTTY_DIALOUT(dev)' the same as `dev'? Either way, the `CZTTY_DIALOUT' macro becomes unused with this diff. > if (error) > goto bad; >