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]
Date:   Thu, 15 Jul 2021 12:04:14 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        xinhui pan <Xinhui.Pan@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>, kernel-janitors@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu/display: make a const array common_rates
 static, makes object smaller

On Thu, Jul 15, 2021 at 10:37 AM Colin King <colin.king@...onical.com> wrote:
>
> From: Colin Ian King <colin.king@...onical.com>
>
> Don't populate the const array common_rates on the stack but instead it
> static. Makes the object code smaller by 80 bytes:
>
> Before:
>    text    data     bss     dec     hex filename
>  268019   98322     256  366597   59805 ../display/amdgpu_dm/amdgpu_dm.o
>
> After:
>    text    data     bss     dec     hex filename
>  267843   98418     256  366517   597b5 ../display/amdgpu_dm/amdgpu_dm.o
>
> Reduction of 80 bytes
>
> (gcc version 10.3.0)
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 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 2d48bb09645f..b196bb6eafc0 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7580,8 +7580,10 @@ static uint add_fs_modes(struct amdgpu_dm_connector *aconnector)
>          * 60       - Commonly used
>          * 48,72,96 - Multiples of 24
>          */
> -       const uint32_t common_rates[] = { 23976, 24000, 25000, 29970, 30000,
> -                                        48000, 50000, 60000, 72000, 96000 };
> +       static const uint32_t common_rates[] = {
> +               23976, 24000, 25000, 29970, 30000,
> +               48000, 50000, 60000, 72000, 96000
> +       };
>
>         /*
>          * Find mode with highest refresh rate with the same resolution
> --
> 2.31.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ