lkml.org 
[lkml]   [2004]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Host Virtual Serial Interface driver
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.043 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site