Re: [PATCH] drm/gud: fix accidentally deleted IS_ERR() check
From: Ruben Wauters
Date: Tue Sep 23 2025 - 05:38:09 EST
On Tue, 2025-09-23 at 09:57 +0200, Thomas Zimmermann wrote:
> FYI I got the following warnings. I'll fix them when I merge the
> patch.
>
> -:6: ERROR:GIT_COMMIT_ID: Please use git commit description style
> 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit
> 2d2f1dc74cfb
> ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm versions")'
> #6:
> During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit
I'm not 100% sure why it's complaining about this one, the format
matches. I assume it's a problem with the line break in it? but I'm not
100% sure.
> -:15: WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be
> immediately
> followed by Closes: with a URL to the report
> #15:
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
I believe it's intentional to have two reported bys in a row, as both
of them are followed by a Closes tag at the end.
Thanks
> Am 22.09.25 um 19:32 schrieb Ruben Wauters:
> > During conversion of WARN_ON_ONCE to drm_WARN_ON_ONCE in commit
> > 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with drm
> > versions"), the IS_ERR check was accidentally removed, breaking the
> > gud_connector_add_properties() function, as any valid pointer in
> > state_val would produce an error.
> >
> > The warning was reported by kernel test robot, and is fixed in this
> > patch.
> >
> > Fixes: 2d2f1dc74cfb ("drm: gud: replace WARN_ON/WARN_ON_ONCE with
> > drm versions")
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Closes:
> > https://lore.kernel.org/r/202509212215.c8v3RKmL-lkp@xxxxxxxxx/
> > Signed-off-by: Ruben Wauters <rubenru09@xxxxxxx>
> > ---
> > drivers/gpu/drm/gud/gud_connector.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/gud/gud_connector.c
> > b/drivers/gpu/drm/gud/gud_connector.c
> > index 62e349b06dbe..1726a3fadff8 100644
> > --- a/drivers/gpu/drm/gud/gud_connector.c
> > +++ b/drivers/gpu/drm/gud/gud_connector.c
> > @@ -593,7 +593,7 @@ int gud_connector_fill_properties(struct
> > drm_connector_state *connector_state,
> > unsigned int *state_val;
> >
> > state_val =
> > gud_connector_tv_state_val(prop, &connector_state->tv);
> > - if (drm_WARN_ON_ONCE(connector_state-
> > >connector->dev, state_val))
> > + if (drm_WARN_ON_ONCE(connector_state-
> > >connector->dev, IS_ERR(state_val)))
> > return PTR_ERR(state_val);
> >
> > val = *state_val;