Re: [RFC] Host Virtual Serial Interface driver

From: Sam Ravnborg
Date: Mon Aug 09 2004 - 13:59:31 EST


On Fri, Aug 06, 2004 at 04:23:05PM -0500, Hollis Blanchard wrote:

Small comments after a _very_ quick skim.

Sam

> static struct tty_struct *hvsi_recv_control(struct hvsi_struct *hp,
> uint8_t *packet)
> {
> struct tty_struct *to_hangup = NULL;
> struct hvsi_control *header = (struct hvsi_control *)packet;
>
> switch (header->verb) {
> case VSV_MODEM_CTL_UPDATE:
> if ((header->word & HVSI_TSCD) == 0) {
> /* CD went away; no more connection */
> pr_debug("hvsi%i: CD dropped\n", hp->index);
> hp->mctrl &= TIOCM_CD;
> if (!(hp->tty->flags & CLOCAL))
> to_hangup = hp->tty;
> }
> break;
> case VSV_CLOSE_PROTOCOL:
> #warning here

This "#warning" should be deleted..

>
> #ifdef DEBUG
> pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len);
> dump_hex((uint8_t*)&packet, packet.len);
> #endif

pr_debug is a noop if DEBUG is not defined. Make dump_hex, dump_packet
be a noop also and you get rid of several #ifdef in the code.


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