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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Dec 2019 20:54:16 +0000
From:   "Liu, Zhan" <Zhan.Liu@....com>
To:     Arnd Bergmann <arnd@...db.de>,
        "Wentland, Harry" <Harry.Wentland@....com>,
        "Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        "Zhou, David(ChunMing)" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
CC:     "Laktyushkin, Dmytro" <Dmytro.Laktyushkin@....com>,
        "Lakha, Bhawanpreet" <Bhawanpreet.Lakha@....com>,
        "Lei, Jun" <Jun.Lei@....com>,
        "Liu, Charlene" <Charlene.Liu@....com>,
        "Yang, Eric" <Eric.Yang2@....com>,
        "Cornij, Nikola" <Nikola.Cornij@....com>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] drm/amd/display: fix undefined struct member reference



> -----Original Message-----
> From: Arnd Bergmann <arnd@...db.de>
> Sent: 2019/December/10, Tuesday 3:31 PM
> To: Wentland, Harry <Harry.Wentland@....com>; Li, Sun peng (Leo)
> <Sunpeng.Li@....com>; Deucher, Alexander
> <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Zhou, David(ChunMing)
> <David1.Zhou@....com>; David Airlie <airlied@...ux.ie>; Daniel Vetter
> <daniel@...ll.ch>; Liu, Zhan <Zhan.Liu@....com>
> Cc: Arnd Bergmann <arnd@...db.de>; Laktyushkin, Dmytro
> <Dmytro.Laktyushkin@....com>; Lakha, Bhawanpreet
> <Bhawanpreet.Lakha@....com>; Lei, Jun <Jun.Lei@....com>; Liu,
> Charlene <Charlene.Liu@....com>; Yang, Eric <Eric.Yang2@....com>;
> Cornij, Nikola <Nikola.Cornij@....com>; amd-gfx@...ts.freedesktop.org;
> dri-devel@...ts.freedesktop.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] drm/amd/display: fix undefined struct member reference
> 
> An initialization was added for two optional struct members.  One of these is
> always present in the dcn20_resource file, but the other one depends on
> CONFIG_DRM_AMD_DC_DSC_SUPPORT and causes a build failure if that is
> missing:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:926:1
> 4: error: excess elements in struct initializer [-Werror]
>    .num_dsc = 5,
> 
> Add another #ifdef around the assignment.
> 
> Fixes: c3d03c5a196f ("drm/amd/display: Include num_vmid and num_dsc
> within NV14's resource caps")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thank you for catching that 😊 On my side I kept that flag enabled all the time, so I didn't realize there was a warning hidden here. 

Reviewed-by: Zhan Liu <zhan.liu@....com>

> ---
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index faab89d1e694..fdf93e6edf43 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -923,7 +923,9 @@ static const struct resource_caps res_cap_nv14 = {
>  		.num_dwb = 1,
>  		.num_ddc = 5,
>  		.num_vmid = 16,
> +#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
>  		.num_dsc = 5,
> +#endif
>  };
> 
>  static const struct dc_debug_options debug_defaults_drv = {
> --
> 2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ