lkml.org 
[lkml]   [2021]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/15] ACPI: acpi_dbg: fix some coding style issues
Date
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@huawei.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
\
 
 \ /
  Last update: 2021-03-27 08:10    [W:0.074 / U:2.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site