Skip to contentSkip to conversation

regulator: qcom-rpmh: Add stylistic breaks in the default cases

PATCH In review Douglas Anderson 2 participants 2 messages Aug 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: qcom-rpmh: Add stylistic breaks in the default cases

No functional change here but it can make the code more readable to have breaks in the "default" case even though it's the last case. Let's add them.

---

 drivers/regulator/qcom-rpmh-regulator.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/regulator/qcom-rpmh-regulator.c +3 -0
index 9f27daebd8c8..b8434e521d72 100644
@@ -504,6 +504,7 @@ static unsigned int rpmh_regulator_pmic4_ldo_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;
@@ -537,6 +538,7 @@ rpmh_regulator_pmic4_smps_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;
@@ -566,6 +568,7 @@ static unsigned int rpmh_regulator_pmic4_bob_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;
Signature · 1 line
2.18.0.597.ga71716f1ad-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Douglas Anderson

No functional change here but it can make the code more readable to have breaks in the "default" case even though it's the last case. Let's add them.

---

 drivers/regulator/qcom-rpmh-regulator.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/regulator/qcom-rpmh-regulator.c +2 -0
index 9f27daebd8c8..b8434e521d72 100644
@@ -504,6 +504,7 @@ static unsigned int rpmh_regulator_pmic4_ldo_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;
@@ -537,6 +538,7 @@ rpmh_regulator_pmic4_smps_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;

drivers/regulator/qcom-rpmh-regulator.c static unsigned int rpmh_regulator_pmic4_bob_of_map_mode(unsigned int rpmh_mode) · line 574

Quoted 7 lines
drivers/regulator/qcom-rpmh-regulator.c +1 -0
@@ -566,6 +568,7 @@ static unsigned int rpmh_regulator_pmic4_bob_of_map_mode(unsigned int rpmh_mode)
 		break;
 	default:
 		mode = REGULATOR_MODE_INVALID;
+		break;
 	}
 
 	return mode;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project