[RFC PATCH 03/11] devfreq: exynos-bus: Change goto-based logic to if-else logic
Krzysztof Kozlowski
krzk at kernel.org
Wed Jul 24 19:10:06 UTC 2019
On Tue, Jul 23, 2019 at 02:20:08PM +0200, Artur Świgoń wrote:
> This patch improves code readability by changing the following construct:
>
> > if (cond)
> > goto passive;
> > foo();
> > goto out;
> >passive:
> > bar();
> >out:
>
> into this:
>
> > if (cond)
> > bar();
> > else
> > foo();
>
> Signed-off-by: Artur Świgoń <a.swigon at partner.samsung.com>
> ---
> drivers/devfreq/exynos-bus.c | 24 +++++++++---------------
> 1 file changed, 9 insertions(+), 15 deletions(-)
Code looks much better:
Reviewed-by: Krzysztof Kozlowski <krzk at kernel.org>
Best regards,
Krzysztof
More information about the dri-devel
mailing list