From: Len Brown <lenb@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
mjg@redhat.com, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/5] ACPI: ec: Do request_region outside WARN()
Date: Thu, 22 Mar 2012 02:08:20 -0400 [thread overview]
Message-ID: <4F6AC1D4.1090602@kernel.org> (raw)
In-Reply-To: <1328545032-21373-2-git-send-email-andi@firstfloor.org>
Applied.
thanks,
Len Brown, Intel Open Source Technology Center
On 02/06/2012 11:17 AM, Andi Kleen wrote:
> WARN() is not supposed to have side effects, so move the request_regions
> outside.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> drivers/acpi/ec.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index b19a18d..3268dcf 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -812,10 +812,10 @@ static int acpi_ec_add(struct acpi_device *device)
> first_ec = ec;
> device->driver_data = ec;
>
> - WARN(!request_region(ec->data_addr, 1, "EC data"),
> - "Could not request EC data io port 0x%lx", ec->data_addr);
> - WARN(!request_region(ec->command_addr, 1, "EC cmd"),
> - "Could not request EC cmd io port 0x%lx", ec->command_addr);
> + ret = !!request_region(ec->data_addr, 1, "EC data");
> + WARN(!ret, "Could not request EC data io port 0x%lx", ec->data_addr);
> + ret = !!request_region(ec->command_addr, 1, "EC cmd");
> + WARN(!ret, "Could not request EC cmd io port 0x%lx", ec->command_addr);
>
> pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
> ec->gpe, ec->command_addr, ec->data_addr);
next prev parent reply other threads:[~2012-03-22 6:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 16:17 Updated throttling fix patchkit Andi Kleen
2012-02-06 16:17 ` [PATCH 1/5] ACPI: ec: Do request_region outside WARN() Andi Kleen
2012-03-22 6:08 ` Len Brown [this message]
2012-02-06 16:17 ` [PATCH 2/5] ACPI: Make ACPI interrupt threaded Andi Kleen
2012-02-06 16:17 ` [PATCH 4/5] ACPI: Do cpufreq clamping for throttling per package v2 Andi Kleen
2012-02-06 16:31 ` Matthew Garrett
2012-02-06 17:59 ` Andi Kleen
2012-02-13 23:30 ` Len Brown
2012-02-14 0:17 ` Matthew Garrett
2012-03-22 6:13 ` Len Brown
2012-03-30 10:05 ` Len Brown
2012-03-30 11:46 ` Matthew Garrett
2012-03-30 12:00 ` Len Brown
2012-02-06 16:17 ` [PATCH 5/5] Disable MCP limit exceeded messages from Intel IPS driver Andi Kleen
2012-02-07 19:45 ` Jesse Barnes
2012-03-22 6:25 ` Len Brown
[not found] ` <1328545032-21373-4-git-send-email-andi@firstfloor.org>
2012-02-06 16:27 ` [PATCH 3/5] ACPI: EC: Add a limited number of repeats after false EC interrupts Matthew Garrett
2012-02-06 18:01 ` Andi Kleen
2012-02-06 16:31 ` Updated throttling fix patchkit Matthew Garrett
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=4F6AC1D4.1090602@kernel.org \
--to=lenb@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.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.