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: <20190722200625.GJ104440@art_vandelay>
Date:   Mon, 22 Jul 2019 16:06:25 -0400
From:   Sean Paul <sean@...rly.run>
To:     Qian Cai <cai@....pw>
Cc:     daniel@...ll.ch, maarten.lankhorst@...ux.intel.com,
        maxime.ripard@...tlin.com, sean@...rly.run, airlied@...ux.ie,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: silence variable 'conn' set but not used

On Mon, Jul 22, 2019 at 03:14:46PM -0400, Qian Cai wrote:
> The "struct drm_connector" iteration cursor from
> "for_each_new_connector_in_state" is never used in atomic_remove_fb()
> which generates a compilation warning,
> 
> drivers/gpu/drm/drm_framebuffer.c: In function 'atomic_remove_fb':
> drivers/gpu/drm/drm_framebuffer.c:838:24: warning: variable 'conn' set
> but not used [-Wunused-but-set-variable]
> 
> Silence it by marking "conn" __maybe_unused.
> 
> Signed-off-by: Qian Cai <cai@....pw>

Thanks for your patch! I've applied it to drm-misc-fixes

Sean

> ---
>  drivers/gpu/drm/drm_framebuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> index 0b72468e8131..57564318ceea 100644
> --- a/drivers/gpu/drm/drm_framebuffer.c
> +++ b/drivers/gpu/drm/drm_framebuffer.c
> @@ -835,7 +835,7 @@ static int atomic_remove_fb(struct drm_framebuffer *fb)
>  	struct drm_device *dev = fb->dev;
>  	struct drm_atomic_state *state;
>  	struct drm_plane *plane;
> -	struct drm_connector *conn;
> +	struct drm_connector *conn __maybe_unused;
>  	struct drm_connector_state *conn_state;
>  	int i, ret;
>  	unsigned plane_mask;
> -- 
> 1.8.3.1
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ