acpi: remove unnecessary paranthesis from return
Subsystems (2)
PATCH 1/1 acpi: remove unnecessary paranthesis from return
From: Diksha Kumari <[email protected]>
checkpatch.pl is generating a warning when return value is enclosed in paranthesis. Remove the paranthesis to improve code readability.
--- drivers/acpi/acpica/dbconvert.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/acpi/acpica/dbconvert.c +14 -14
@@ -32,7 +32,7 @@ acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value)/* Digit must be ascii [0-9a-fA-F] */ if (!isxdigit (hex_char)) { -return (AE_BAD_HEX_CONSTANT ); +return AE_BAD_HEX_CONSTANT ; }if (hex_char <=0x39 ) {
@@ -42,7 +42,7 @@ acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value) } *return_value = value; -return (AE_OK ); +return AE_OK ; }/*******************************************************************************
@@ -69,18 +69,18 @@ static acpi_status acpi_db_hex_byte_to_binary(char *hex_byte, u8 *return_value) status =acpi_db_hex_char_to_value (hex_byte[0 ], &local0);if (ACPI_FAILURE (status)) { -return (status); +return status; }/* Low byte */ status =acpi_db_hex_char_to_value (hex_byte[1 ], &local1);if (ACPI_FAILURE (status)) { -return (status); +return status; } *return_value = (u8)((local0 <<4 ) | local1); -return (AE_OK ); +return AE_OK ; }/*******************************************************************************
@@ -123,7 +123,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object) buffer =ACPI_ALLOCATE (length);if (!buffer) { -return (AE_NO_MEMORY ); +return AE_NO_MEMORY ; }/* Convert the command line bytes to the buffer */
@@ -132,7 +132,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object) status =acpi_db_hex_byte_to_binary (&string[i], &buffer[j]);if (ACPI_FAILURE (status)) {ACPI_FREE (buffer); -return (status); +return status; } j++;
@@ -145,7 +145,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object) object->type =ACPI_TYPE_BUFFER ; object->buffer.pointer = buffer; object->buffer.length = length; -return (AE_OK ); +return AE_OK ; }/*******************************************************************************
@@ -175,7 +175,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object)ACPI_ALLOCATE_ZEROED (DB_DEFAULT_PKG_ELEMENTS *sizeof (union acpi_object ));if (!elements) -return (AE_NO_MEMORY ); +return AE_NO_MEMORY ; this = string;for (i =0 ; i < (DB_DEFAULT_PKG_ELEMENTS -1 ); i++) {
@@ -190,7 +190,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object)if (ACPI_FAILURE (status)) {acpi_db_delete_objects (i +1 , elements);ACPI_FREE (elements); -return (status); +return status; } this = next;
@@ -199,7 +199,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object) object->type =ACPI_TYPE_PACKAGE ; object->package.count = i; object->package.elements = elements; -return (AE_OK ); +return AE_OK ; }/*******************************************************************************
@@ -251,7 +251,7 @@ acpi_db_convert_to_object(acpi_object_type type,break ; } -return (status); +return status; }/*******************************************************************************
@@ -273,7 +273,7 @@ u8 *acpi_db_encode_pld_buffer(struct acpi_pld_info *pld_info) buffer =ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE );if (!buffer) { -return (NULL ); +return NULL ; }/* First 32 bits */
@@ -331,7 +331,7 @@ u8 *acpi_db_encode_pld_buffer(struct acpi_pld_info *pld_info)ACPI_MOVE_32_TO_32 (&buffer[4 ], &dword); } -return (ACPI_CAST_PTR (u8, buffer)); +return ACPI_CAST_PTR (u8, buffer); }/*******************************************************************************
Signature · 1 line
2.34.1
Quoted 2 lines
checkpatch.pl is generating a warning when return value is enclosed in paranthesis. Remove the paranthesis to improve
…
parenthesis?
You may occasionally put more than 58 characters into text lines of such a change description.
Please avoid a typo also in the summary phrase.
…
drivers/acpi/acpica/dbconvert.c acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value) · line 36
Quoted 8 lines
+++
b/drivers/acpi/acpica/dbconvert.cdrivers/acpi/acpica/dbconvert.c +1
-1@@ -32,7 +32,7 @@ acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value)/* Digit must be ascii [0-9a-fA-F] */ if (!isxdigit (hex_char)) { -return (AE_BAD_HEX_CONSTANT ); +return AE_BAD_HEX_CONSTANT ; }
…
Regards,
Markus
Quoted 5 lines · Markus Elfring
Quoted 2 lines
checkpatch.pl is generating a warning when return value is enclosed in paranthesis. Remove the paranthesis to improve
…
parenthesis?
will fix this in next revision.
Quoted 3 lines
You may occasionally put more than 58 characters into text lines of such a change description.
Noted.
Quoted 4 lines
Please avoid a typo also in the summary phrase.
…
Quoted 8 lines
drivers/acpi/acpica/dbconvert.c acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value) · line 36
Quoted 8 lines
+++
b/drivers/acpi/acpica/dbconvert.cdrivers/acpi/acpica/dbconvert.c +1
-1@@ -32,7 +32,7 @@ acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value)/* Digit must be ascii [0-9a-fA-F] */ if (!isxdigit (hex_char)) { -return (AE_BAD_HEX_CONSTANT ); +return AE_BAD_HEX_CONSTANT ; }
will fix this in next revision.
Regards,
Diksha
Quoted 7 lines
…
Regards,
Markus