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: <CADnq5_N=gp4KXxt6SCg31tRbOu66qp5NV2V9OKcMWP2fRntbhQ@mail.gmail.com>
Date:   Thu, 12 Jan 2023 14:07:34 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     harry.wentland@....com, sunpeng.li@....com,
        Abaci Robot <abaci@...ux.alibaba.com>, Xinhui.Pan@....com,
        Rodrigo.Siqueira@....com, linux-kernel@...r.kernel.org,
        amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        alexander.deucher@....com, christian.koenig@....com
Subject: Re: [PATCH] drm/amd/display: Remove useless else if

Applied.  Thanks!

On Wed, Jan 11, 2023 at 10:21 PM Jiapeng Chong
<jiapeng.chong@...ux.alibaba.com> wrote:
>
> The assignment of the else and if branches is the same, so the if else
> here is redundant, so we remove it.
>
> ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1951:2-4: WARNING: possible condition with no effect (if == else).
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3719
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 4300ce98ce8d..aa3024e58d12 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1948,10 +1948,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
>                 dmub_asic = DMUB_ASIC_DCN21;
>                 break;
>         case IP_VERSION(3, 0, 0):
> -               if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 0))
> -                       dmub_asic = DMUB_ASIC_DCN30;
> -               else
> -                       dmub_asic = DMUB_ASIC_DCN30;
> +               dmub_asic = DMUB_ASIC_DCN30;
>                 break;
>         case IP_VERSION(3, 0, 1):
>                 dmub_asic = DMUB_ASIC_DCN301;
> --
> 2.20.1.7.g153144c
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ