[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210112134327.GC3575260@dell>
Date: Tue, 12 Jan 2021 13:43:27 +0000
From: Lee Jones <lee.jones@...aro.org>
To: linux-kernel@...r.kernel.org,
Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 14/40] drm/amd/display/dc/calcs/dce_calcs: Remove some
large variables from the stack
On Mon, 11 Jan 2021, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘bw_calcs_init’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2726:1: warning: the frame size of 1336 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Cc: Harry Wentland <harry.wentland@....com>
> Cc: Leo Li <sunpeng.li@....com>
> Cc: Alex Deucher <alexander.deucher@....com>
> Cc: "Christian König" <christian.koenig@....com>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: amd-gfx@...ts.freedesktop.org
> Cc: dri-devel@...ts.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
> .../gpu/drm/amd/display/dc/calcs/dce_calcs.c | 1115 +++++++++--------
> 1 file changed, 560 insertions(+), 555 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
> index a0c69fae40ced..f69c2b84d432b 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
> @@ -2035,707 +2035,712 @@ void bw_calcs_init(struct bw_calcs_dceip *bw_dceip,
> struct bw_calcs_vbios *bw_vbios,
> struct hw_asic_id asic_id)
> {
> - struct bw_calcs_dceip dceip = { 0 };
> - struct bw_calcs_vbios vbios = { 0 };
> + struct bw_calcs_dceip *dceip;
> + struct bw_calcs_vbios *vbios;
>
> enum bw_calcs_version version = bw_calcs_version_from_asic_id(asic_id);
>
> - dceip.version = version;
> + dceip = kzalloc(sizeof(dceip), GFP_KERNEL);
> + vbios = kzalloc(sizeof(vbios), GFP_KERNEL);
Please don't review/merge this yet. I missed some error checking.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists