From: Lyude Paul <lyude@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Takashi Iwai <tiwai@suse.de>, Sean Paul <seanpaul@chromium.org>,
Dave Airlie <airlied@redhat.com>, Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning
Date: Tue, 03 Mar 2020 13:58:55 -0500 [thread overview]
Message-ID: <865432f15c7e13f212ecd4ddff0a9cc78d34e89d.camel@redhat.com> (raw)
In-Reply-To: <20200302133023.GQ11960@pendragon.ideasonboard.com>
On Mon, 2020-03-02 at 15:30 +0200, Laurent Pinchart wrote:
> Hi Pankaj,
>
> Thank you for the patch.
>
> On Mon, Mar 02, 2020 at 06:26:46PM +0530, Pankaj Bharadiya wrote:
> > nouveau_drm pointer is not getting used anymore in
> > nv50_mstm_{register,destroy}_connector functions, hence remove it.
> >
> > This fixes below warning.
> >
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_destroy_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> > struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > ^~~
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_register_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> > struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > ^~~
>
> As commented on 7/9, you should squash this with the patch that
> introduces the warnings.
Agreed, with the patches squashed you can count this as:
Reviewed-by: Lyude Paul <lyude@redhat.com>
fwiw - completely optional but if you'd like, you can probably also go ahead
and remove drm_dp_mst_topology_mgr_cbs.register_connector and
drm_dp_mst_topology_mgr_cbs.destroy_connector and replace them with open-
coding, since those callbacks are literally identical amongst every driver and
don't do anything other then call
drm_connector_register()/drm_connector_unregister()/drm_connector_put().
> > Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> > drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > index 97dd50e2917d..4e164ad8003f 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -1260,7 +1260,6 @@ static void
> > nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
> > struct drm_connector *connector)
> > {
> > - struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > struct nv50_mstc *mstc = nv50_mstc(connector);
> >
> > drm_connector_unregister(&mstc->connector);
> > @@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct
> > drm_dp_mst_topology_mgr *mgr,
> > static void
> > nv50_mstm_register_connector(struct drm_connector *connector)
> > {
> > - struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > -
> > drm_connector_register(connector);
> > }
> >
--
Cheers,
Lyude Paul (she/her)
Associate Software Engineer at Red Hat
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-03-03 18:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 12:56 [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup Pankaj Bharadiya
2020-03-02 12:56 ` [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init Pankaj Bharadiya
2020-03-02 13:44 ` Thomas Zimmermann
2020-03-02 21:38 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions Pankaj Bharadiya
2020-03-02 21:41 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls Pankaj Bharadiya
2020-03-02 21:41 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 4/9] drm/i915/display: " Pankaj Bharadiya
2020-03-02 21:42 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls Pankaj Bharadiya
2020-03-02 21:42 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning Pankaj Bharadiya
2020-03-02 13:30 ` Laurent Pinchart
2020-03-03 18:58 ` Lyude Paul [this message]
2020-03-02 12:56 ` [Intel-gfx] [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach Pankaj Bharadiya
2020-03-02 13:27 ` Laurent Pinchart
2020-03-02 12:56 ` [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions Pankaj Bharadiya
2020-03-02 13:27 ` Laurent Pinchart
2020-03-02 21:43 ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 9/9] drm/todo: Update drm_fb_helper tasks Pankaj Bharadiya
2020-03-02 13:29 ` Laurent Pinchart
2020-03-02 21:35 ` Daniel Vetter
2020-03-02 14:29 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: drm_fb_helper cleanup Patchwork
2020-03-02 14:47 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-03-02 15:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-02 15:58 ` [Intel-gfx] [PATCH 0/9] " Emil Velikov
2020-03-02 16:17 ` Emil Velikov
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=865432f15c7e13f212ecd4ddff0a9cc78d34e89d.camel@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=seanpaul@chromium.org \
--cc=tiwai@suse.de \
/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