mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [RFC] Host Virtual Serial Interface driver
Date: Mon, 9 Aug 2004 20:48:59 +0200	[thread overview]
Message-ID: <20040809184859.GA20397@mars.ravnborg.org> (raw)
In-Reply-To: <1091827384.31867.21.camel@localhost>

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.



  parent reply	other threads:[~2004-08-09 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06 21:23 Hollis Blanchard
2004-08-09 17:51 ` Randy.Dunlap
2004-08-09 18:46   ` Hollis Blanchard
2004-08-09 18:48 ` Sam Ravnborg [this message]
2004-08-09 18:51   ` Hollis Blanchard
2004-08-09 19:00     ` Sam Ravnborg
2004-08-09 19:08       ` Hollis Blanchard
2004-08-09 19:12     ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040809184859.GA20397@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=hollisb@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®