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]
Message-ID: <CADnq5_PUZbPh0gmrTcY-cuLeUjfXNt8bS5YBz8g3VgCskYeh4A@mail.gmail.com>
Date:   Tue, 10 Nov 2020 16:48:26 -0500
From:   Alex Deucher <alexdeucher@...il.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     David Airlie <airlied@...ux.ie>,
        LKML <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Christian König <christian.koenig@....com>,
        "moderated list:DMA BUFFER SHARING FRAMEWORK" 
        <linaro-mm-sig@...ts.linaro.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        Alex Deucher <alexander.deucher@....com>,
        linux-media <linux-media@...r.kernel.org>
Subject: Re: [PATCH 18/19] gpu: drm: amd: amdgpu: amdgpu: Mark global
 variables as __maybe_unused

On Thu, Nov 5, 2020 at 9:52 AM Lee Jones <lee.jones@...aro.org> wrote:
>
> These 3 variables are used in *some* sourcefiles which include
> amdgpu.h, but not *all*.  This leads to a flurry of build warnings.
>
> Fixes the following W=1 kernel build warning(s):
>
>  from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67,
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=]
>
>  NB: Repeats ~650 times - snipped for brevity.
>
> 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: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: amd-gfx@...ts.freedesktop.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-media@...r.kernel.org
> Cc: linaro-mm-sig@...ts.linaro.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 183b09d71b64a..5939753080056 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -193,9 +193,9 @@ extern int sched_policy;
>  extern bool debug_evictions;
>  extern bool no_system_mem_limit;
>  #else
> -static const int sched_policy = KFD_SCHED_POLICY_HWS;
> -static const bool debug_evictions; /* = false */
> -static const bool no_system_mem_limit;
> +static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;
> +static const bool __maybe_unused debug_evictions; /* = false */
> +static const bool __maybe_unused no_system_mem_limit;
>  #endif
>
>  extern int amdgpu_tmz;
> --
> 2.25.1
>
> _______________________________________________
> 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