lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220413051734.5975-1-xiam0nd.tong@gmail.com>
Date:   Wed, 13 Apr 2022 13:17:34 +0800
From:   Xiaomeng Tong <xiam0nd.tong@...il.com>
To:     patrik.r.jakobsson@...il.com
Cc:     airlied@...ux.ie, daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, xiam0nd.tong@...il.com
Subject: Re: [PATCH v2] drm/gma500: fix a potential repeat execution in psb_driver_load

On Tue, 12 Apr 2022 16:58:24 +0200, Patrik Jakobsson wrote:
> Hi,
> This would work but using gotos like this easily turns the code into
> spaghetti. See "7. Centralized exiting of functions" in
> Documentation/process/coding-style.rst for when to use gotos.
> 
> In this particular case I think we are better off using an
> if-statement. What about something like this:
> 
> if (gma_encoder->type == INTEL_OUTPUT_LVDS ||
>     gma_encoder->type == INTEL_OUTPUT_MIPI) {
>         ret = gma_backlight_init();
>         break;
> }

Yes, it looks better.
I have sent a PATCH v3 with changes as you suggested, please check it.
Thank you very much.

--
Xiaomeng Tong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ