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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f9fb8e9-0d6b-c6bb-619a-50cabc610421@wanadoo.fr>
Date:   Thu, 18 May 2023 08:28:47 +0200
From:   Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Hamza Mahfooz <hamza.mahfooz@....com>,
        amd-gfx@...ts.freedesktop.org
Cc:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Qingqing Zhuo <qingqing.zhuo@....com>,
        Aurabindo Pillai <aurabindo.pillai@....com>,
        Hans de Goede <hdegoede@...hat.com>,
        Hersen Wu <hersenxs.wu@....com>,
        Stylon Wang <stylon.wang@....com>, Jun Lei <Jun.Lei@....com>,
        Wenjing Liu <wenjing.liu@....com>,
        Leon Huang <Leon.Huang1@....com>,
        Mike Hsieh <Mike.Hsieh@....com>,
        Cruise Hung <Cruise.Hung@....com>,
        Nasir Osman <nasir.osman@....com>,
        pengfuyuan <pengfuyuan@...inos.cn>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] drm/amd/display: drop redundant memset() in
 get_available_dsc_slices()


Le 17/05/2023 à 20:33, Hamza Mahfooz a écrit :
> get_available_dsc_slices() returns the number of indices set, and all of
> the users of get_available_dsc_slices() don't cross the returned bound
> when iterating over available_slices[]. So, the memset() in
> get_available_dsc_slices() is redundant and can be dropped.
>
> Fixes: 97bda0322b8a ("drm/amd/display: Add DSC support for Navi (v2)")
> Reported-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@....com>
> ---
>   drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
> index b9a05bb025db..58dd62cce4bb 100644
> --- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
> @@ -645,8 +645,6 @@ static int get_available_dsc_slices(union dsc_enc_slice_caps slice_caps, int *av
>   {
>   	int idx = 0;
>   
> -	memset(available_slices, -1, MIN_AVAILABLE_SLICES_SIZE);
> -
>   	if (slice_caps.bits.NUM_SLICES_1)
>   		available_slices[idx++] = 1;
>   

Thanks for it, it went off my radar.


FWIW:

Reviewed-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ