All of lore.kernel.org
 help / color / mirror / Atom feed
From: mochel@linux.intel.com
To: linux-acpi@vger.kernel.org
Cc: Patrick Mochel <mochel@linux.intel.com>
Subject: [PATCH 21/24] Remove unneeded debugging macros in drivers/acpi/processor_thermal.c
Date: Mon, 17 Apr 2006 18:21:55 -0700	[thread overview]
Message-ID: <11453233152030-git-send-email-mochel@linux.intel.com> (raw)
In-Reply-To: <11453233154124-git-send-email-mochel@linux.intel.com>

Signed-off-by: Patrick Mochel <mochel@linux.intel.com>

---

 drivers/acpi/processor_thermal.c |   42 ++++++++++++++------------------------
 1 files changed, 16 insertions(+), 26 deletions(-)

applies-to: 72188ed0aa80350aa7d44e92d7d45257bda7c522
57c8be1f7b709b279845d1e4f6e50fd94ce51ce8
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index c2095ab..b2fd31d 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -54,13 +54,11 @@ static int acpi_processor_apply_limit(st
 	u16 px = 0;
 	u16 tx = 0;
 
-	ACPI_FUNCTION_TRACE("acpi_processor_apply_limit");
-
 	if (!pr)
-		return_VALUE(-EINVAL);
+		return -EINVAL;
 
 	if (!pr->flags.limit)
-		return_VALUE(-ENODEV);
+		return -ENODEV;
 
 	if (pr->flags.throttling) {
 		if (pr->limit.user.tx > tx)
@@ -84,7 +82,7 @@ static int acpi_processor_apply_limit(st
 	if (result)
 		ACPI_ERROR((AE_INFO, "Unable to set limit"));
 
-	return_VALUE(result);
+	return result;
 }
 
 #ifdef CONFIG_CPU_FREQ
@@ -200,19 +198,17 @@ int acpi_processor_set_thermal_limit(acp
 	struct acpi_device *device = NULL;
 	int tx = 0, max_tx_px = 0;
 
-	ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit");
-
 	if ((type < ACPI_PROCESSOR_LIMIT_NONE)
 	    || (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
-		return_VALUE(-EINVAL);
+		return -EINVAL;
 
 	result = acpi_bus_get_device(handle, &device);
 	if (result)
-		return_VALUE(result);
+		return result;
 
 	pr = (struct acpi_processor *)acpi_driver_data(device);
 	if (!pr)
-		return_VALUE(-ENODEV);
+		return -ENODEV;
 
 	/* Thermal limits are always relative to the current Px/Tx state. */
 	if (pr->flags.throttling)
@@ -296,22 +292,20 @@ int acpi_processor_set_thermal_limit(acp
 	} else
 		result = 0;
 	if (max_tx_px)
-		return_VALUE(1);
+		return 1;
 	else
-		return_VALUE(result);
+		return result;
 }
 
 int acpi_processor_get_limit_info(struct acpi_processor *pr)
 {
-	ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info");
-
 	if (!pr)
-		return_VALUE(-EINVAL);
+		return -EINVAL;
 
 	if (pr->flags.throttling)
 		pr->flags.limit = 1;
 
-	return_VALUE(0);
+	return 0;
 }
 
 /* /proc interface */
@@ -320,8 +314,6 @@ static int acpi_processor_limit_seq_show
 {
 	struct acpi_processor *pr = (struct acpi_processor *)seq->private;
 
-	ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show");
-
 	if (!pr)
 		goto end;
 
@@ -338,7 +330,7 @@ static int acpi_processor_limit_seq_show
 		   pr->limit.thermal.px, pr->limit.thermal.tx);
 
       end:
-	return_VALUE(0);
+	return 0;
 }
 
 static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
@@ -358,34 +350,32 @@ static ssize_t acpi_processor_write_limi
 	int px = 0;
 	int tx = 0;
 
-	ACPI_FUNCTION_TRACE("acpi_processor_write_limit");
-
 	if (!pr || (count > sizeof(limit_string) - 1)) {
-		return_VALUE(-EINVAL);
+		return -EINVAL;
 	}
 
 	if (copy_from_user(limit_string, buffer, count)) {
-		return_VALUE(-EFAULT);
+		return -EFAULT;
 	}
 
 	limit_string[count] = '\0';
 
 	if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
 		ACPI_ERROR((AE_INFO, "Invalid data format"));
-		return_VALUE(-EINVAL);
+		return -EINVAL;
 	}
 
 	if (pr->flags.throttling) {
 		if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
 			ACPI_ERROR((AE_INFO, "Invalid tx"));
-			return_VALUE(-EINVAL);
+			return -EINVAL;
 		}
 		pr->limit.user.tx = tx;
 	}
 
 	result = acpi_processor_apply_limit(pr);
 
-	return_VALUE(count);
+	return count;
 }
 
 struct file_operations acpi_processor_limit_fops = {
---
0.99.9.GIT



  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                                       ` mochel [this message]
2006-04-18  1:21                                         ` [PATCH 22/24] Remove unneeded debugging macros in drivers/acpi/processor_throttling.c mochel
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=11453233152030-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.