Skip to contentSkip to conversation

acpi: utils: remove unneeded break

PATCH Applied [email protected] 2 participants 2 messages Oct 19, 2020 – Oct 22, 2020 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: utils: remove unneeded break

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

---
 drivers/acpi/utils.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/acpi/utils.c +0 -4
index 838b719ec7ce..d5411a166685 100644
@@ -104,7 +104,6 @@ acpi_extract_package(union acpi_object *package,
 					      " [%c]\n",
 					      i, format_string[i]);
 				return AE_BAD_DATA;
-				break;
 			}
 			break;
 
@@ -129,7 +128,6 @@ acpi_extract_package(union acpi_object *package,
 					      " expecting [%c]\n",
 					      i, format_string[i]);
 				return AE_BAD_DATA;
-				break;
 			}
 			break;
 		case ACPI_TYPE_LOCAL_REFERENCE:
@@ -144,7 +142,6 @@ acpi_extract_package(union acpi_object *package,
 					      " expecting [%c]\n",
 					      i, format_string[i]);
 				return AE_BAD_DATA;
-				break;
 			}
 			break;
 
@@ -155,7 +152,6 @@ acpi_extract_package(union acpi_object *package,
 					  i));
 			/* TBD: handle nested packages... */
 			return AE_SUPPORT;
-			break;
 		}
 	}
 
Signature · 1 line
2.18.1
maintainer Applied
#1 lore raw
Quoted 39 lines · On Mon, Oct 19, 2020 at 10:05 PM <[email protected]> wrote:

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a return

---
 drivers/acpi/utils.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/acpi/utils.c +0 -3
index 838b719ec7ce..d5411a166685 100644
@@ -104,7 +104,6 @@ acpi_extract_package(union acpi_object *package,
                                              " [%c]\n",
                                              i, format_string[i]);
                                return AE_BAD_DATA;
-                               break;
                        }
                        break;
 
@@ -129,7 +128,6 @@ acpi_extract_package(union acpi_object *package,
                                              " expecting [%c]\n",
                                              i, format_string[i]);
                                return AE_BAD_DATA;
-                               break;
                        }
                        break;
                case ACPI_TYPE_LOCAL_REFERENCE:
@@ -144,7 +142,6 @@ acpi_extract_package(union acpi_object *package,
                                              " expecting [%c]\n",
                                              i, format_string[i]);
                                return AE_BAD_DATA;
-                               break;
                        }
                        break;
 

drivers/acpi/utils.c acpi_extract_package(union acpi_object *package,

Quoted 8 lines
drivers/acpi/utils.c +0 -2
@@ -155,7 +152,6 @@ acpi_extract_package(union acpi_object *package,
                                          i));
                        /* TBD: handle nested packages... */
                        return AE_SUPPORT;
-                       break;
                }
        }
 
--

Applied as 5.10-rc material with subject and changelog edits, thanks!