From: mochel@linux.intel.com
To: linux-acpi@vger.kernel.org
Cc: Patrick Mochel <mochel@linux.intel.com>
Subject: [PATCH 22/24] Remove unneeded debugging macros in drivers/acpi/processor_throttling.c
Date: Mon, 17 Apr 2006 18:21:55 -0700 [thread overview]
Message-ID: <11453233151522-git-send-email-mochel@linux.intel.com> (raw)
In-Reply-To: <11453233152030-git-send-email-mochel@linux.intel.com>
---
drivers/acpi/processor_throttling.c | 48 ++++++++++++++---------------------
1 files changed, 19 insertions(+), 29 deletions(-)
applies-to: a75363b5033310198c804b052b0ad35fd925b52c
72e80a7f3b6461863c98f982fac94801a71474cb
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 97856ad..6552e22 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -55,13 +55,11 @@ static int acpi_processor_get_throttling
u32 duty_mask = 0;
u32 duty_value = 0;
- ACPI_FUNCTION_TRACE("acpi_processor_get_throttling");
-
if (!pr)
- return_VALUE(-EINVAL);
+ return -EINVAL;
if (!pr->flags.throttling)
- return_VALUE(-ENODEV);
+ return -ENODEV;
pr->throttling.state = 0;
@@ -93,7 +91,7 @@ static int acpi_processor_get_throttling
"Throttling state is T%d (%d%% throttling applied)\n",
state, pr->throttling.states[state].performance));
- return_VALUE(0);
+ return 0;
}
int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
@@ -102,19 +100,17 @@ int acpi_processor_set_throttling(struct
u32 duty_mask = 0;
u32 duty_value = 0;
- ACPI_FUNCTION_TRACE("acpi_processor_set_throttling");
-
if (!pr)
- return_VALUE(-EINVAL);
+ return -EINVAL;
if ((state < 0) || (state > (pr->throttling.state_count - 1)))
- return_VALUE(-EINVAL);
+ return -EINVAL;
if (!pr->flags.throttling)
- return_VALUE(-ENODEV);
+ return -ENODEV;
if (state == pr->throttling.state)
- return_VALUE(0);
+ return 0;
/*
* Calculate the duty_value and duty_mask.
@@ -165,7 +161,7 @@ int acpi_processor_set_throttling(struct
(pr->throttling.states[state].performance ? pr->
throttling.states[state].performance / 10 : 0)));
- return_VALUE(0);
+ return 0;
}
int acpi_processor_get_throttling_info(struct acpi_processor *pr)
@@ -174,8 +170,6 @@ int acpi_processor_get_throttling_info(s
int step = 0;
int i = 0;
- ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info");
-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
pr->throttling.address,
@@ -183,21 +177,21 @@ int acpi_processor_get_throttling_info(s
pr->throttling.duty_width));
if (!pr)
- return_VALUE(-EINVAL);
+ return -EINVAL;
/* TBD: Support ACPI 2.0 objects */
if (!pr->throttling.address) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n"));
- return_VALUE(0);
+ return 0;
} else if (!pr->throttling.duty_width) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n"));
- return_VALUE(0);
+ return 0;
}
/* TBD: Support duty_cycle values that span bit 4. */
else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
ACPI_WARNING((AE_INFO, "duty_cycle spans bit 4"));
- return_VALUE(0);
+ return 0;
}
/*
@@ -208,7 +202,7 @@ int acpi_processor_get_throttling_info(s
if (errata.piix4.throttle) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Throttling not supported on PIIX4 A- or B-step\n"));
- return_VALUE(0);
+ return 0;
}
pr->throttling.state_count = 1 << acpi_fadt.duty_width;
@@ -254,7 +248,7 @@ int acpi_processor_get_throttling_info(s
if (result)
pr->flags.throttling = 0;
- return_VALUE(result);
+ return result;
}
/* proc interface */
@@ -266,8 +260,6 @@ static int acpi_processor_throttling_seq
int i = 0;
int result = 0;
- ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show");
-
if (!pr)
goto end;
@@ -296,7 +288,7 @@ static int acpi_processor_throttling_seq
throttling.states[i].performance / 10 : 0));
end:
- return_VALUE(0);
+ return 0;
}
static int acpi_processor_throttling_open_fs(struct inode *inode,
@@ -315,13 +307,11 @@ static ssize_t acpi_processor_write_thro
struct acpi_processor *pr = (struct acpi_processor *)m->private;
char state_string[12] = { '\0' };
- ACPI_FUNCTION_TRACE("acpi_processor_write_throttling");
-
if (!pr || (count > sizeof(state_string) - 1))
- return_VALUE(-EINVAL);
+ return -EINVAL;
if (copy_from_user(state_string, buffer, count))
- return_VALUE(-EFAULT);
+ return -EFAULT;
state_string[count] = '\0';
@@ -329,9 +319,9 @@ static ssize_t acpi_processor_write_thro
simple_strtoul(state_string,
NULL, 0));
if (result)
- return_VALUE(result);
+ return result;
- return_VALUE(count);
+ return count;
}
struct file_operations acpi_processor_throttling_fops = {
---
0.99.9.GIT
next prev parent reply other threads:[~2006-04-18 1:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 1:21 [PATCH 1/24] Remove unneeded debugging macros in drivers/acpi/ac.c mochel
2006-04-18 1:21 ` [PATCH 2/24] Remove unneeded debugging macros in drivers/acpi/acpi_memhotplug.c mochel
2006-04-18 1:21 ` [PATCH 3/24] Remove unneeded debugging macros in drivers/acpi/battery.c mochel
2006-04-18 1:21 ` [PATCH 4/24] Remove unneeded debugging macros in drivers/acpi/bus.c mochel
2006-04-18 1:21 ` [PATCH 5/24] Remove unneeded debugging macros in drivers/acpi/button.c mochel
2006-04-18 1:21 ` [PATCH 6/24] Remove unneeded debugging macros in drivers/acpi/container.c mochel
2006-04-18 1:21 ` [PATCH 7/24] Remove unneeded debugging macros in drivers/acpi/debug.c mochel
2006-04-18 1:21 ` [PATCH 8/24] Remove unneeded debugging macros in drivers/acpi/ec.c mochel
2006-04-18 1:21 ` [PATCH 9/24] Remove unneeded debugging macros in drivers/acpi/event.c mochel
2006-04-18 1:21 ` [PATCH 10/24] Remove unneeded debugging macros in drivers/acpi/fan.c mochel
2006-04-18 1:21 ` [PATCH 11/24] Remove unneeded debugging macros in drivers/acpi/hotkey.c mochel
2006-04-18 1:21 ` [PATCH 12/24] Remove unneeded debugging macros in drivers/acpi/motherboard.c mochel
2006-04-18 1:21 ` [PATCH 13/24] Remove unneeded debugging macros in drivers/acpi/pci_bind.c mochel
2006-04-18 1:21 ` [PATCH 14/24] Remove unneeded debugging macros in drivers/acpi/pci_irq.c mochel
2006-04-18 1:21 ` [PATCH 15/24] Remove unneeded debugging macros in drivers/acpi/pci_link.c mochel
2006-04-18 1:21 ` [PATCH 16/24] Remove unneeded debugging macros in drivers/acpi/pci_root.c mochel
2006-04-18 1:21 ` [PATCH 17/24] Remove unneeded debugging macros in drivers/acpi/power.c mochel
2006-04-18 1:21 ` [PATCH 18/24] Remove unneeded debugging macros in drivers/acpi/processor_core.c mochel
2006-04-18 1:21 ` [PATCH 19/24] Remove unneeded debugging macros in drivers/acpi/processor_idle.c mochel
2006-04-18 1:21 ` [PATCH 20/24] Remove unneeded debugging macros in drivers/acpi/processor_perflib.c mochel
2006-04-18 1:21 ` [PATCH 21/24] Remove unneeded debugging macros in drivers/acpi/processor_thermal.c mochel
2006-04-18 1:21 ` mochel [this message]
2006-04-18 1:21 ` [PATCH 23/24] Remove unneeded debugging macros in drivers/acpi/system.c mochel
2006-04-18 1:21 ` [PATCH 24/24] Remove unneeded debugging macros in drivers/acpi/thermal.c mochel
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=11453233151522-git-send-email-mochel@linux.intel.com \
--to=mochel@linux.intel.com \
--cc=linux-acpi@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.