From: Peter Ujfalusi <peter.ujfalusi@gmail.com>
To: dvhart@infradead.org, mjg59@srcf.ucam.org
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, peter.ujfalusi@gmail.com
Subject: [PATCH 1/2] intel-rst: Use ACPI_FAILURE() macro instead !ACPI_SUCCESS() for error checking
Date: Wed, 17 Sep 2014 00:13:55 +0300 [thread overview]
Message-ID: <1410902036-10282-2-git-send-email-peter.ujfalusi@gmail.com> (raw)
In-Reply-To: <1410902036-10282-1-git-send-email-peter.ujfalusi@gmail.com>
ACPI_SUCCESS is defined as:
#define ACPI_SUCCESS(a) (!(a))
There is no need for the the double ! since there is already a macro
defined for failures: ACPI_FAILURE()
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
---
drivers/platform/x86/intel-rst.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel-rst.c b/drivers/platform/x86/intel-rst.c
index d45bca3..8c6a8fe 100644
--- a/drivers/platform/x86/intel-rst.c
+++ b/drivers/platform/x86/intel-rst.c
@@ -35,7 +35,7 @@ static ssize_t irst_show_wakeup_events(struct device *dev,
acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFFS", NULL, &value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return sprintf(buf, "%lld\n", value);
@@ -59,7 +59,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFFS", value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return count;
@@ -81,7 +81,7 @@ static ssize_t irst_show_wakeup_time(struct device *dev,
acpi = to_acpi_device(dev);
status = acpi_evaluate_integer(acpi->handle, "GFTV", NULL, &value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return sprintf(buf, "%lld\n", value);
@@ -105,7 +105,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
status = acpi_execute_simple_method(acpi->handle, "SFTV", value);
- if (!ACPI_SUCCESS(status))
+ if (ACPI_FAILURE(status))
return -EINVAL;
return count;
--
2.1.0
next prev parent reply other threads:[~2014-09-16 21:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 21:13 [PATCH 0/2] intel-rst: Small cleanups Peter Ujfalusi
2014-09-16 21:13 ` Peter Ujfalusi [this message]
2014-09-16 22:49 ` [PATCH 1/2] intel-rst: Use ACPI_FAILURE() macro instead !ACPI_SUCCESS() for error checking Darren Hart
2014-09-16 21:13 ` [PATCH 2/2] intel-rst: Clean up ACPI add function Peter Ujfalusi
2014-09-16 23:25 ` Darren Hart
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=1410902036-10282-2-git-send-email-peter.ujfalusi@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox