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

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