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_OQqos8x-pkYzo0zdxj3Ay427BRmau4Hyk6zX5Nd4pKDA@mail.gmail.com>
Date:   Wed, 8 Apr 2020 15:17:31 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Roman Li <roman.li@....com>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        Mikita Lipski <mikita.lipski@....com>,
        Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
        Nicholas Kazlauskas <nicholas.kazlauskas@....com>
Subject: Re: [PATCH] drm/amdgpu/display: avoid unused-variable warning

On Wed, Apr 8, 2020 at 3:13 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> Without CONFIG_DEBUG_FS, this newly added function causes a harmless
> warning:
>
> amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_connector_late_register':
> amdgpu_dm/amdgpu_dm.c:4723:30: error: unused variable 'amdgpu_dm_connector' [-Werror=unused-variable]
>  4723 |  struct amdgpu_dm_connector *amdgpu_dm_connector =
>       |                              ^~~~~~~~~~~~~~~~~~~
>
> Use an IS_ENABLED() check instead to let the compiler see what
> is going on.
>
> Fixes: 14f04fa4834a ("drm/amdgpu/display: add a late register connector callback")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Already fixed:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next&id=ef04ca2a941ae62cef517eac08210fed5c20fd5d

Alex

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 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 d3674d805a0a..8ab23fe98059 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -51,9 +51,7 @@
>  #include "amdgpu_dm_irq.h"
>  #include "dm_helpers.h"
>  #include "amdgpu_dm_mst_types.h"
> -#if defined(CONFIG_DEBUG_FS)
>  #include "amdgpu_dm_debugfs.h"
> -#endif
>
>  #include "ivsrcid/ivsrcid_vislands30.h"
>
> @@ -4723,9 +4721,8 @@ amdgpu_dm_connector_late_register(struct drm_connector *connector)
>         struct amdgpu_dm_connector *amdgpu_dm_connector =
>                 to_amdgpu_dm_connector(connector);
>
> -#if defined(CONFIG_DEBUG_FS)
> -       connector_debugfs_init(amdgpu_dm_connector);
> -#endif
> +       if (IS_ENABLED(CONFIG_DEBUG_FS))
> +               connector_debugfs_init(amdgpu_dm_connector);
>
>         return 0;
>  }
> --
> 2.26.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ