From: jthiessen@penguincomputing.com (Justin Thiessen)
To: Arjan van de Ven <arjan@infradead.org>
Cc: greg@kroah.com, phil@netroedge.com, khali@linux-fr.org,
sensors@Stimpy.netroedge.com, linux-kernel@vger.kernel.org
Subject: adm1026 driver port for kernel 2.6.10-rc2 [RE-REVISED DRIVER]
Date: Thu, 19 May 2005 06:25:23 +0000 [thread overview]
Message-ID: <20041122194327.GB4698@penguincomputing.com> (raw)
In-Reply-To: <1100945635.2639.31.camel@laptop.fenrus.org>
On Sat, Nov 20, 2004 at 11:13:56AM +0100, Arjan van de Ven wrote:
> On Thu, 2004-11-18 at 10:56 -0800, Justin Thiessen wrote:
> > MODULE_PARM(gpio_input,"1-17i");
>
> new 2.6 drivers should NOT use MODULE_PARM, it's deprecated.
> use module_param() instead
Ok. You mean module_param_array() in these particular cases, right?
> > int adm1026_attach_adapter(struct i2c_adapter *adapter)
> > {
> > if (!(adapter->class & I2C_CLASS_HWMON)) {
> > return 0;
> > }
>
> no need for extra { }'s in such a case
Of course there's no _need_. But I find the result stylistically easier to
read. Is there any real objection?
> > static ssize_t show_in(struct device *dev, char *buf, int nr)
> > {
> > struct adm1026_data *data = adm1026_update_device(dev);
> > return sprintf(buf,"%d\n", INS_FROM_REG(nr, data->in[nr]));
> > }
>
> any chance you could make this use snprintf instead ?
I'll defer to Jean's response...
<snip awkward locking construct>
> this locking construct is rahter awkward; is it possible to refactor the
> code such that you can down and up in the same function ?
Yes, at the cost of some minor code duplication or the introduction of
another variable. Is that preferable? Is holding the lock across function
calls a Bad Idea?
Justin Thiessen
---------------
jthiessen@penguincomputing.com
WARNING: multiple messages have this Message-ID (diff)
From: Justin Thiessen <jthiessen@penguincomputing.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: greg@kroah.com, phil@netroedge.com, khali@linux-fr.org,
sensors@Stimpy.netroedge.com, linux-kernel@vger.kernel.org
Subject: Re: adm1026 driver port for kernel 2.6.10-rc2 [RE-REVISED DRIVER]
Date: Mon, 22 Nov 2004 11:43:27 -0800 [thread overview]
Message-ID: <20041122194327.GB4698@penguincomputing.com> (raw)
In-Reply-To: <1100945635.2639.31.camel@laptop.fenrus.org>
On Sat, Nov 20, 2004 at 11:13:56AM +0100, Arjan van de Ven wrote:
> On Thu, 2004-11-18 at 10:56 -0800, Justin Thiessen wrote:
> > MODULE_PARM(gpio_input,"1-17i");
>
> new 2.6 drivers should NOT use MODULE_PARM, it's deprecated.
> use module_param() instead
Ok. You mean module_param_array() in these particular cases, right?
> > int adm1026_attach_adapter(struct i2c_adapter *adapter)
> > {
> > if (!(adapter->class & I2C_CLASS_HWMON)) {
> > return 0;
> > }
>
> no need for extra { }'s in such a case
Of course there's no _need_. But I find the result stylistically easier to
read. Is there any real objection?
> > static ssize_t show_in(struct device *dev, char *buf, int nr)
> > {
> > struct adm1026_data *data = adm1026_update_device(dev);
> > return sprintf(buf,"%d\n", INS_FROM_REG(nr, data->in[nr]));
> > }
>
> any chance you could make this use snprintf instead ?
I'll defer to Jean's response...
<snip awkward locking construct>
> this locking construct is rahter awkward; is it possible to refactor the
> code such that you can down and up in the same function ?
Yes, at the cost of some minor code duplication or the introduction of
another variable. Is that preferable? Is holding the lock across function
calls a Bad Idea?
Justin Thiessen
---------------
jthiessen@penguincomputing.com
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:25 adm1026 driver port for kernel 2.6.X Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Justin Thiessen
2005-05-19 6:25 ` Mark M. Hoffman
2005-05-19 6:25 ` Justin Thiessen
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Justin Thiessen
2004-11-02 16:46 ` adm1026 driver port for kernel 2.6.X - [REVISED DRIVER] Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2004-11-02 19:31 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-02 22:17 ` Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2004-11-03 8:01 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-03 16:43 ` adm1026 driver port for kernel 2.6.X - [RE-REVISED DRIVER] Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2004-11-16 18:56 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-18 18:56 ` adm1026 driver port for kernel 2.6.10-rc2 " Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2004-11-20 9:57 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-22 19:35 ` Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2004-11-20 10:13 ` Arjan van de Ven
2005-05-19 6:25 ` Arjan van de Ven
2004-11-20 10:32 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-22 19:43 ` Justin Thiessen [this message]
2005-05-19 6:25 ` Justin Thiessen
2004-11-22 21:00 ` Arjan van de Ven
2005-05-19 6:25 ` Arjan van de Ven
2004-11-22 21:30 ` linux-os
2005-05-19 6:25 ` linux-os
2004-11-23 17:58 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2004-11-23 16:52 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, patch to Kconfig, and patch to Makefile) Justin Thiessen
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, Justin Thiessen
2004-11-23 17:50 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, patch to Kconfig, and patch to Makefile) Jean Delvare
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes Jean Delvare
2004-11-24 21:36 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, patch to Kconfig, and patch to Makefile) Greg KH
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, Greg KH
2004-11-24 23:10 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, patch to Kconfig, and patch to Makefile) [fixed] Justin Thiessen
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes Justin Thiessen
2004-11-24 22:35 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, patch to Kconfig, and patch to Makefile) [fixed] Greg KH
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.10-rc2 (patch includes driver, Greg KH
2005-05-19 6:25 ` adm1026 driver port for kernel 2.6.X Jean Delvare
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=20041122194327.GB4698@penguincomputing.com \
--to=jthiessen@penguincomputing.com \
--cc=arjan@infradead.org \
--cc=greg@kroah.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phil@netroedge.com \
--cc=sensors@Stimpy.netroedge.com \
/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.