[PATCH 18/32] regmap-mmio: regmap_mmio_get_min_stride: unify branches for readability
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Sep 5 02:55:43 PDT 2022
We just return min_stride after the switch statement, so instead of
returning 0 directly for 8 bits, just have all code reach the same return
at the end.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/base/regmap/regmap-mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index c8422ca46f3c..7b1501df933b 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -46,7 +46,7 @@ static int regmap_mmio_get_min_stride(size_t val_bits)
case 8:
/* The core treats 0 as 1 */
min_stride = 0;
- return 0;
+ break;
case 16:
min_stride = 2;
break;
--
2.30.2
More information about the barebox
mailing list