[PATCH v3 0/4] devfreq: Clean up exynos-bus driver
From: Artur ÅwigoÅ
Date: Mon Dec 09 2019 - 05:50:52 EST
The following patchset incorporates the first four patches from a bigger
RFC[1]. The purpose of these patches is to improve readability of the code,
with the main focus on the exynos_bus_probe() function.
The original exynos_bus_probe() function has 13 local variables, over 140
lines of code, and multiple goto statements. Patches 01 and 02 from this
series extract two mutually exclusive code paths into separate functions,
exynos_bus_profile_init[_passive](). Furthermore, patch 03 reduces the
number of goto statements by introducing an if-else construct.
The last patch adds other minor improvements, including cleaning up header
includes, variables, and return paths. This also applies to functions
introduced by patches 01 & 02 -- to avoid moving and changing code in the
same patch.
---
Changes since RFCv2[1] (patches 01..04):
* Rebase on next-20191209.
* Drop some unnecessary changes, cf. [2].
---
Artur ÅwigoÅ
Samsung R&D Institute Poland
Samsung Electronics
---
References:
[1] https://patchwork.kernel.org/cover/11152595/
[2] https://patchwork.kernel.org/patch/11152637/
Artur ÅwigoÅ (4):
devfreq: exynos-bus: Extract exynos_bus_profile_init()
devfreq: exynos-bus: Extract exynos_bus_profile_init_passive()
devfreq: exynos-bus: Change goto-based logic to if-else logic
devfreq: exynos-bus: Clean up code
drivers/devfreq/exynos-bus.c | 156 +++++++++++++++++++----------------
1 file changed, 84 insertions(+), 72 deletions(-)
--
2.17.1