From: Sean Paul <sean@poorly.run>
To: Qian Cai <cai@lca.pw>
Cc: daniel@ffwll.ch, maarten.lankhorst@linux.intel.com,
maxime.ripard@bootlin.com, sean@poorly.run, airlied@linux.ie,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: silence variable 'conn' set but not used
Date: Mon, 22 Jul 2019 16:06:25 -0400 [thread overview]
Message-ID: <20190722200625.GJ104440@art_vandelay> (raw)
In-Reply-To: <1563822886-13570-1-git-send-email-cai@lca.pw>
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@lca.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
prev parent reply other threads:[~2019-07-22 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 19:14 Qian Cai
2019-07-22 20:06 ` Sean Paul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190722200625.GJ104440@art_vandelay \
--to=sean@poorly.run \
--cc=airlied@linux.ie \
--cc=cai@lca.pw \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime.ripard@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®