[lkml]   [2019]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v3 0/4] devfreq: Clean up exynos-bus driver
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


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(-)


 \ /
  Last update: 2019-12-09 11:51    [W:0.069 / U:2.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site