linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	ML dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: atomic helper: fix W=1 warnings
Date: Thu, 3 Oct 2019 11:52:34 +0200	[thread overview]
Message-ID: <CA+M3ks5=7N=sB2K6oqMGAUoi8DaCoRW1SEOs3_JHOj13qRV1oQ@mail.gmail.com> (raw)
In-Reply-To: <CA+M3ks7Y998qW+dOLPD+WLUH-Qi-=-okTYwDh7SBB0xo5XAs_w@mail.gmail.com>

Le lun. 16 sept. 2019 à 15:19, Benjamin Gaignard
<benjamin.gaignard@linaro.org> a écrit :
>
> Le lun. 9 sept. 2019 à 16:41, Benjamin Gaignard
> <benjamin.gaignard@st.com> a écrit :
> >
> > Fix warnings with W=1.
> > Few for_each macro set variables that are never used later.
> > Prevent warning by marking these variables as __maybe_unused.
> >
>

Gentle Ping

benjamin

> A little up on this one because it may exist others ways to fix these warnings.
> Get feedback on this path could give the direction for similar ones in drm.
>
> Thanks,
> Benjamin
>
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> > ---
> >  drivers/gpu/drm/drm_atomic_helper.c | 36 ++++++++++++++++++------------------
> >  1 file changed, 18 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index aa16ea17ff9b..b69d17b0b9bd 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -262,7 +262,7 @@ steal_encoder(struct drm_atomic_state *state,
> >               struct drm_encoder *encoder)
> >  {
> >         struct drm_crtc_state *crtc_state;
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *old_connector_state, *new_connector_state;
> >         int i;
> >
> > @@ -412,7 +412,7 @@ mode_fixup(struct drm_atomic_state *state)
> >  {
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *new_crtc_state;
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *new_conn_state;
> >         int i;
> >         int ret;
> > @@ -608,7 +608,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
> >  {
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *old_connector_state, *new_connector_state;
> >         int i, ret;
> >         unsigned connectors_mask = 0;
> > @@ -984,7 +984,7 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
> >  static void
> >  disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
> >  {
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *old_conn_state, *new_conn_state;
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> > @@ -1173,7 +1173,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
> >  {
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *new_crtc_state;
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *new_conn_state;
> >         int i;
> >
> > @@ -1294,7 +1294,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *old_crtc_state;
> >         struct drm_crtc_state *new_crtc_state;
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *new_conn_state;
> >         int i;
> >
> > @@ -1384,7 +1384,7 @@ int drm_atomic_helper_wait_for_fences(struct drm_device *dev,
> >                                       struct drm_atomic_state *state,
> >                                       bool pre_swap)
> >  {
> > -       struct drm_plane *plane;
> > +       struct drm_plane __maybe_unused *plane;
> >         struct drm_plane_state *new_plane_state;
> >         int i, ret;
> >
> > @@ -1431,7 +1431,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> >                 struct drm_atomic_state *old_state)
> >  {
> >         struct drm_crtc *crtc;
> > -       struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> > +       struct drm_crtc_state __maybe_unused *old_crtc_state, *new_crtc_state;
> >         int i, ret;
> >         unsigned crtc_mask = 0;
> >
> > @@ -1621,7 +1621,7 @@ static void commit_work(struct work_struct *work)
> >  int drm_atomic_helper_async_check(struct drm_device *dev,
> >                                    struct drm_atomic_state *state)
> >  {
> > -       struct drm_crtc *crtc;
> > +       struct drm_crtc __maybe_unused *crtc;
> >         struct drm_crtc_state *crtc_state;
> >         struct drm_plane *plane = NULL;
> >         struct drm_plane_state *old_plane_state = NULL;
> > @@ -1982,9 +1982,9 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,
> >  {
> >         struct drm_crtc *crtc;
> >         struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> > -       struct drm_connector *conn;
> > +       struct drm_connector __maybe_unused *conn;
> >         struct drm_connector_state *old_conn_state, *new_conn_state;
> > -       struct drm_plane *plane;
> > +       struct drm_plane __maybe_unused *plane;
> >         struct drm_plane_state *old_plane_state, *new_plane_state;
> >         struct drm_crtc_commit *commit;
> >         int i, ret;
> > @@ -2214,7 +2214,7 @@ EXPORT_SYMBOL(drm_atomic_helper_fake_vblank);
> >   */
> >  void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *old_state)
> >  {
> > -       struct drm_crtc *crtc;
> > +       struct drm_crtc __maybe_unused *crtc;
> >         struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> >         struct drm_crtc_commit *commit;
> >         int i;
> > @@ -2300,7 +2300,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done);
> >  int drm_atomic_helper_prepare_planes(struct drm_device *dev,
> >                                      struct drm_atomic_state *state)
> >  {
> > -       struct drm_connector *connector;
> > +       struct drm_connector __maybe_unused *connector;
> >         struct drm_connector_state *new_conn_state;
> >         struct drm_plane *plane;
> >         struct drm_plane_state *new_plane_state;
> > @@ -2953,9 +2953,9 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
> >  {
> >         struct drm_atomic_state *state;
> >         struct drm_connector_state *conn_state;
> > -       struct drm_connector *conn;
> > +       struct drm_connector __maybe_unused *conn;
> >         struct drm_plane_state *plane_state;
> > -       struct drm_plane *plane;
> > +       struct drm_plane __maybe_unused *plane;
> >         struct drm_crtc_state *crtc_state;
> >         struct drm_crtc *crtc;
> >         int ret, i;
> > @@ -3199,11 +3199,11 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
> >  {
> >         int i, ret;
> >         struct drm_plane *plane;
> > -       struct drm_plane_state *new_plane_state;
> > +       struct drm_plane_state __maybe_unused *new_plane_state;
> >         struct drm_connector *connector;
> > -       struct drm_connector_state *new_conn_state;
> > +       struct drm_connector_state __maybe_unused *new_conn_state;
> >         struct drm_crtc *crtc;
> > -       struct drm_crtc_state *new_crtc_state;
> > +       struct drm_crtc_state __maybe_unused *new_crtc_state;
> >
> >         state->acquire_ctx = ctx;
> >
> > --
> > 2.15.0
> >

  reply	other threads:[~2019-10-03  9:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 13:52 [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config Benjamin Gaignard
2019-09-09 13:52 ` [PATCH] drm: atomic helper: fix W=1 warnings Benjamin Gaignard
2019-09-16 13:19   ` Benjamin Gaignard
2019-10-03  9:52     ` Benjamin Gaignard [this message]
2019-10-03 14:27   ` Ville Syrjälä
2019-10-03 14:46     ` Benjamin Gaignard
2019-10-03 15:05       ` Ville Syrjälä
2019-10-03 15:37         ` Benjamin Gaignard
2019-10-03 15:46           ` Ville Syrjälä
2019-10-04 10:48             ` Benjamin Gaignard
2019-10-04 12:27               ` Ville Syrjälä
2019-10-04 12:36                 ` Benjamin GAIGNARD
2019-10-04 13:08                   ` Ville Syrjälä
2019-10-08  9:55           ` Daniel Vetter
2019-09-10 12:58 ` [PATCH] drm: include: fix W=1 warnings in struct drm_dsc_config Harry Wentland
2019-09-10 17:58   ` Manasi Navare

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='CA+M3ks5=7N=sB2K6oqMGAUoi8DaCoRW1SEOs3_JHOj13qRV1oQ@mail.gmail.com' \
    --to=benjamin.gaignard@linaro.org \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] drm: atomic helper: fix W=1 warnings' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).