All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Nat Gurumoorthy <natg@google.com>
Cc: Jean Delvare <khali@linux-fr.org>,
	Wim Van Sebroeck <wim@iguana.be>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mikew@google.com" <mikew@google.com>
Subject: Re: [lm-sensors] (no subject)
Date: Fri, 06 May 2011 19:13:20 +0000	[thread overview]
Message-ID: <1304709200.31666.498.camel@groeck-laptop> (raw)
In-Reply-To: <1304707960-10178-1-git-send-email-natg@google.com>

On Fri, 2011-05-06 at 14:52 -0400, Nat Gurumoorthy wrote:
> There are 3 different drivers that touch the it87 hardware registers.
> The 3 drivers have been written independently and access the it87 hardware
> registers assuming they are the only driver accessing it. This change
> attempts to serialize access to the hardware by using
> "request_muxed_region" macro defined by Alan Cox. Call to this macro
> will hold off the requestor if the resource is currently busy.
> The use of the above macro makes it possible to get rid of
> spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
> This also greatly simplifies the implementation of it87_wdt.c driver.
> 
> 01 - Changes to it87 watchdog driver to use "request_muxed_region"
>  drivers/watchdog/it8712f_wdt.c
>  drivers/watchdog/it87_wdt.c
> 
> 02 - Chages to hwmon it87 driver to use "request_muxed_region"
>  drivers/hwmon/it87.c
> 
>  drivers/hwmon/it87.c           |   14 +++-
>  drivers/watchdog/it8712f_wdt.c |   60 ++++++++++----
>  drivers/watchdog/it87_wdt.c    |  165 +++++++++++++++++++++++----------------
>  3 files changed, 152 insertions(+), 87 deletions(-)
> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
> 
> Signed-off-by: Nat Gurumoorthy <natg@google.com>
> 
> Patch History:
> v8:
> - Return the error actually returned by superio_enter and not -EBUSY.

Hi Nat,

Your use of -EBUSY vs. the returned error code is still inconsistent,
for superio_enter() as well as for other functions returning an error
code.

Also, the following line split is really unnecessary.

-static inline void superio_enter(void)
+static inline int
+superio_enter(void)

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Nat Gurumoorthy <natg@google.com>
Cc: Jean Delvare <khali@linux-fr.org>,
	Wim Van Sebroeck <wim@iguana.be>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mikew@google.com" <mikew@google.com>
Subject: Re:
Date: Fri, 6 May 2011 12:13:20 -0700	[thread overview]
Message-ID: <1304709200.31666.498.camel@groeck-laptop> (raw)
In-Reply-To: <1304707960-10178-1-git-send-email-natg@google.com>

On Fri, 2011-05-06 at 14:52 -0400, Nat Gurumoorthy wrote:
> There are 3 different drivers that touch the it87 hardware registers.
> The 3 drivers have been written independently and access the it87 hardware
> registers assuming they are the only driver accessing it. This change
> attempts to serialize access to the hardware by using
> "request_muxed_region" macro defined by Alan Cox. Call to this macro
> will hold off the requestor if the resource is currently busy.
> The use of the above macro makes it possible to get rid of
> spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
> This also greatly simplifies the implementation of it87_wdt.c driver.
> 
> 01 - Changes to it87 watchdog driver to use "request_muxed_region"
>  drivers/watchdog/it8712f_wdt.c
>  drivers/watchdog/it87_wdt.c
> 
> 02 - Chages to hwmon it87 driver to use "request_muxed_region"
>  drivers/hwmon/it87.c
> 
>  drivers/hwmon/it87.c           |   14 +++-
>  drivers/watchdog/it8712f_wdt.c |   60 ++++++++++----
>  drivers/watchdog/it87_wdt.c    |  165 +++++++++++++++++++++++----------------
>  3 files changed, 152 insertions(+), 87 deletions(-)
> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
> 
> Signed-off-by: Nat Gurumoorthy <natg@google.com>
> 
> Patch History:
> v8:
> - Return the error actually returned by superio_enter and not -EBUSY.

Hi Nat,

Your use of -EBUSY vs. the returned error code is still inconsistent,
for superio_enter() as well as for other functions returning an error
code.

Also, the following line split is really unnecessary.

-static inline void superio_enter(void)
+static inline int
+superio_enter(void)

Guenter



  parent reply	other threads:[~2011-05-06 19:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-29 14:39 [lm-sensors] (no subject) John WICKS
2008-09-23 13:29 ` gaming
2011-05-04  7:03 ` Jeremy Harmon
2011-05-06 18:52 ` Nat Gurumoorthy
2011-05-06 18:52   ` Nat Gurumoorthy
2011-05-06 18:54   ` [lm-sensors] [PATCH v8 1/2] Use "request_muxed_region" in it87 Nat Gurumoorthy
2011-05-06 18:54     ` [PATCH v8 1/2] Use "request_muxed_region" in it87 watchdog drivers Nat Gurumoorthy
2011-05-06 18:55   ` [lm-sensors] [PATCH v8 2/2] Use "request_muxed_region" in it87 Nat Gurumoorthy
2011-05-06 18:55     ` [PATCH v8 2/2] Use "request_muxed_region" in it87 hwmon drivers Nat Gurumoorthy
2011-05-06 19:13   ` Guenter Roeck [this message]
2011-05-06 19:13     ` Guenter Roeck
2011-05-06 20:00     ` [lm-sensors] (no subject) Natarajan Gurumoorthy
2011-05-06 20:00       ` Natarajan Gurumoorthy
2011-05-10 18:53 ` [lm-sensors] (no subject) Jeremy Harmon
2011-11-26 18:26 ` su_pyrow
2011-12-08 18:31 ` Guenter Roeck
2011-12-08 18:36 ` Guenter Roeck
2012-11-07 20:09 ` 郭�园
2012-12-04  7:22 ` Dok Sander
2013-08-23 23:53 ` Robert Hinson
2013-10-29 17:51 ` morgan chong
     [not found] <200703231349.l2NDnj1q025087@whb1.seed.net.tw>
2007-07-24 14:40 ` cilly
2009-11-09  3:39 ` jack
2012-02-29  9:23 ` sravan vasu
2012-02-29 14:40 ` Guenter Roeck
2012-04-23 20:35 ` Crunchy Toast
2012-04-25  7:18 ` Mr. Tux
2012-07-11 14:16 ` Stevie Trujillo
2012-07-11 14:45 ` Guenter Roeck
2012-07-11 15:26 ` richardvoigt

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=1304709200.31666.498.camel@groeck-laptop \
    --to=guenter.roeck@ericsson.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=mikew@google.com \
    --cc=natg@google.com \
    --cc=wim@iguana.be \
    /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.