diff mbox series

[v2,03/15] ACPI: debug: fix some coding style issues

Message ID 1616831193-17920-4-git-send-email-tanxiaofei@huawei.com
State New
Headers show
Series None | expand

Commit Message

Xiaofei Tan March 27, 2021, 7:46 a.m. UTC
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 mbox series

Patch

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())