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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bjt7eca8.wl-ashutosh.dixit@intel.com>
Date: Mon, 07 Apr 2025 17:18:23 -0700
From: "Dixit, Ashutosh" <ashutosh.dixit@...el.com>
To: Anusha Srivatsa <asrivats@...hat.com>
Cc: <imre.deak@...el.com>,
	Neil Armstrong <neil.armstrong@...aro.org>,
	"Jessica Zhang" <quic_jesszhan@...cinc.com>,
	Maarten Lankhorst
	<maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>,
	Simona Vetter <simona@...ll.ch>,
	Linus Walleij <linus.walleij@...aro.org>,
	Joel Selvaraj <jo@...amily.in>,
	Douglas Anderson <dianders@...omium.org>,
	<dri-devel@...ts.freedesktop.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()

On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> >
> > Hi,
> >
> > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > Move to using the new API devm_drm_panel_alloc() to allocate the
> > > panel.
> > >
> > > Signed-off-by: Anusha Srivatsa <asrivats@...hat.com>
> > > ---
> > >  drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > >  1 file changed, 4 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > @@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)
> > >
> > >	spi->mode |= SPI_MODE_3 | SPI_3WIRE;
> > >
> > > -	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> > > -	if (!priv)
> > > -		return -ENOMEM;
> > > +	panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
> > > +				     &a030jtn01_funcs, DRM_MODE_CONNECTOR_DPI);
> >
> > This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU
> > it's supposed to be
> >	priv = devm_drm_panel_alloc(...);
>
> Yes:
>
> drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function ‘a030jtn01_probe’:
> drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’ undeclared (first use in this function)
>   203 |         panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
>       |         ^~~~~
> drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears in
>
> Please turn on the config options for particular module if you are making
> changes to that module.

Though probably, you can argue, that the pre-merge CI build should already
be doing this. A sort of allmodconfig for the DRM subsystem, so that these
kinds of issues don't get missed.


>
> >
> > > +	if (IS_ERR(panel))
> > > +		return PTR_ERR(panel);
> > >
> > >	priv->spi = spi;
> > >	spi_set_drvdata(spi, priv);
> > > @@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)
> > >	if (IS_ERR(priv->reset_gpio))
> > >		return dev_err_probe(dev, PTR_ERR(priv->reset_gpio), "Failed to get reset GPIO");
> > >
> > > -	drm_panel_init(&priv->panel, dev, &a030jtn01_funcs,
> > > -		       DRM_MODE_CONNECTOR_DPI);
> > > -
> > >	err = drm_panel_of_backlight(&priv->panel);
> > >	if (err)
> > >		return err;
> > >
> > > --
> > > 2.48.1
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ