mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-kernel@vger.kernel.org, bilotta78@hotpop.com,
	danlee@informatik.uni-freiburg.de, vojtech@suse.cz,
	tuukkat@ee.oulu.fi
Subject: Re: [RFC/RFT] Raw access to serio ports (1/2)
Date: Wed, 2 Jun 2004 00:36:26 -0700	[thread overview]
Message-ID: <20040602003626.4d754944.akpm@osdl.org> (raw)
In-Reply-To: <200406020218.42979.dtor_core@ameritech.net>

Dmitry Torokhov <dtor_core@ameritech.net> wrote:
>
> Hi,
> 
> Below is an implementation of rawdev driver.

Yes, it does appear that we need the feature, thanks.

> Comments?

They're the thingies inside /* and */.  Your patch is refreshingly free of
them ;)

> +static ssize_t rawdev_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
> +{
> +	struct rawdev_list *list = file->private_data;
> +	ssize_t written = 0;
> +	int retval;
> +	unsigned char c;
> +
> +	retval = down_interruptible(&rawdev_sem);
> +	if (retval)
> +		return retval;
> +
> +	if (!list->rawdev->serio) {
> +		retval = -ENODEV;
> +		goto out;
> +	}

The return values here are mucked up - this function returns `written'.

> +	if (count > 32)
> +		count = 32;

Why?  (Don't tell me - add a comment!)


  reply	other threads:[~2004-06-02  7:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02  7:18 Dmitry Torokhov
2004-06-02  7:36 ` Andrew Morton [this message]
2004-06-02  7:43   ` Dmitry Torokhov
2004-06-02  7:46     ` Andrew Morton
2004-06-02  7:49     ` Dmitry Torokhov
2004-06-03  5:45   ` Dmitry Torokhov
2004-06-03  6:26     ` Sau Dan Lee
2004-06-03  6:38       ` Dmitry Torokhov
2004-06-05  7:31       ` [RFC/RFT] Raw access to serio ports (1/2) - take 3 Dmitry Torokhov

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=20040602003626.4d754944.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=bilotta78@hotpop.com \
    --cc=danlee@informatik.uni-freiburg.de \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuukkat@ee.oulu.fi \
    --cc=vojtech@suse.cz \
    /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®