[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1616831193-17920-4-git-send-email-tanxiaofei@huawei.com>
Date: Sat, 27 Mar 2021 15:46:21 +0800
From: Xiaofei Tan <tanxiaofei@...wei.com>
To: <rjw@...ysocki.net>, <lenb@...nel.org>, <rui.zhang@...el.com>,
<bhelgaas@...gle.com>
CC: Xiaofei Tan <tanxiaofei@...wei.com>, <linux-acpi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linuxarm@...neuler.org>
Subject: [PATCH v2 03/15] ACPI: debug: fix some coding style issues
Fix some coding style issues reported by checkpatch.pl, including
following types:
WARNING: space prohibited between function name and open parenthesis
WARNING: else is not generally useful after a break or return
Signed-off-by: Xiaofei Tan <tanxiaofei@...wei.com>
---
drivers/acpi/acpi_dbg.c | 40 +++++++++++++++++++---------------------
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
index d50261d..e641bc1 100644
--- a/drivers/acpi/acpi_dbg.c
+++ b/drivers/acpi/acpi_dbg.c
@@ -21,7 +21,7 @@
#include <linux/acpi.h>
#include "internal.h"
-#define ACPI_AML_BUF_ALIGN (sizeof (acpi_size))
+#define ACPI_AML_BUF_ALIGN (sizeof(acpi_size))
#define ACPI_AML_BUF_SIZE PAGE_SIZE
#define circ_count(circ) \
@@ -613,16 +613,15 @@ static ssize_t acpi_aml_read(struct file *file, char __user *buf,
if (ret == -EAGAIN) {
if (file->f_flags & O_NONBLOCK)
break;
- else {
- ret = wait_event_interruptible(acpi_aml_io.wait,
- acpi_aml_user_readable());
- /*
- * We need to retry when the condition
- * becomes true.
- */
- if (ret == 0)
- goto again;
- }
+
+ ret = wait_event_interruptible(acpi_aml_io.wait,
+ acpi_aml_user_readable());
+ /*
+ * We need to retry when the condition
+ * becomes true.
+ */
+ if (ret == 0)
+ goto again;
}
if (ret < 0) {
if (!acpi_aml_running())
@@ -683,16 +682,15 @@ static ssize_t acpi_aml_write(struct file *file, const char __user *buf,
if (ret == -EAGAIN) {
if (file->f_flags & O_NONBLOCK)
break;
- else {
- ret = wait_event_interruptible(acpi_aml_io.wait,
- acpi_aml_user_writable());
- /*
- * We need to retry when the condition
- * becomes true.
- */
- if (ret == 0)
- goto again;
- }
+
+ ret = wait_event_interruptible(acpi_aml_io.wait,
+ acpi_aml_user_writable());
+ /*
+ * We need to retry when the condition
+ * becomes true.
+ */
+ if (ret == 0)
+ goto again;
}
if (ret < 0) {
if (!acpi_aml_running())
--
2.8.1
Powered by blists - more mailing lists