public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	uclinux-dist-devel@blackfin.uclinux.org,
	Bryan Wu <cooloney@kernel.org>
Subject: Re: [PATCH] tty: bfin_jtag_comm: emulate a TTY over the Blackfin EMUDAT/JTAG interface
Date: Wed, 03 Jun 2009 00:04:12 +0200	[thread overview]
Message-ID: <4A25A1DC.3000305@gmail.com> (raw)
In-Reply-To: <1243970734-31541-1-git-send-email-vapier@gentoo.org>

On 06/02/2009 09:25 PM, Mike Frysinger wrote:
> diff --git a/drivers/char/bfin_jtag_comm.c b/drivers/char/bfin_jtag_comm.c
> new file mode 100644
> index 0000000..854f265
> --- /dev/null
> +++ b/drivers/char/bfin_jtag_comm.c
> @@ -0,0 +1,365 @@
> +#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })

This should be __initconst.

> +#define debug(fmt, args...) pr_debug(DRV_NAME ": " fmt, ## args)

Just define pr_fmt, instead of yet another debug macro.

> +static void
> +bfin_jc_wait_until_sent(struct tty_struct *tty, int timeout)
> +{
> +	unsigned long expire = jiffies + timeout;
> +	while (!circ_empty(&bfin_jc_write_buf)) {
> +		if (signal_pending(current))
> +			break;
> +		if (time_after(jiffies, expire))
> +			break;

Maybe some sort of sleep here?

> +	}
> +}

The tty handling is weird. You should take a reference before accessing
the structure.

  reply	other threads:[~2009-06-02 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 19:25 [PATCH] tty: bfin_jtag_comm: emulate a TTY over the Blackfin EMUDAT/JTAG interface Mike Frysinger
2009-06-02 22:04 ` Jiri Slaby [this message]
2009-06-02 23:21   ` Mike Frysinger
2009-06-03  8:58 ` Alan Cox
2009-06-03  9:20   ` [PATCH v2] " Mike Frysinger

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=4A25A1DC.3000305@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cooloney@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.org \
    /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