All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [PATCH 2.6] New chip driver: pcf8591
Date: Thu, 19 May 2005 06:24:51 +0000	[thread overview]
Message-ID: <20040409214207.731d2648.khali@linux-fr.org> (raw)
In-Reply-To: <20040328160717.GA32728@pc.aurel32.private>

> Sorry for the delay, this has now been applied, along with a few
> formatting changes, and one bugfix:
> 
> > +static ssize_t set_out0_output(struct device *dev, const char *buf,
> > size_t count)+{
> > +	unsigned int value;
> > +	struct i2c_client *client = to_i2c_client(dev);
> > +	struct pcf8591_data *data = i2c_get_clientdata(client);
> > +	if ((value = (simple_strtoul(buf, NULL, 10) + 5) / 10) <= 255);
> > +	{
> > +		data->aout = value;
> > +		i2c_smbus_write_byte_data(client, data->control, data->aout);
> > +	}
> > +	return count;
> > +}
> 
> I fixed that if statement above (you really didn't want that ';'
> there, right?

OMG, we missed that...

Nice catching Greg! :)

BTW, wouldn't a "else return -1" make sense here? Silently ignoring
errors doesn't sound good to me.

Sorry for not noticing this before.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

  reply	other threads:[~2005-05-19  6:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19  6:24 [PATCH 2.6] New chip driver: pcf8591 Aurelien Jarno
2005-05-19  6:24 ` Jean Delvare [this message]
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Greg KH
2005-05-19  6:24 ` Greg KH

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=20040409214207.731d2648.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.