[PATCH v9 5/8] drm: Remove usage of deprecated DRM_ERROR

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jun 6 17:13:51 UTC 2023


On Tue, Jun 06, 2023 at 10:36:25PM +0530, Siddh Raman Pant wrote:
> On Tue, 06 Jun 2023 20:14:52 +0530, Laurent Pinchart wrote:
> > Hi Siddh,
> > 
> > Thank you for the patch.
> 
> Anytime :)
> 
> > >       if (!crtcs || !modes || !enabled || !offsets) {
> > > -             DRM_ERROR("Memory allocation failed\n");
> > > +             drm_err(client->dev, "Memory allocation failed\n");
> > 
> > We could probably drop this message as memory allocation functions are
> > already vocal on failure, but that's a separate fix.
> 
> Okay. Should I send a patch at the end of the series removing the
> superfluous messages you pointed out in drm core?

That would be nice, thanks.

> > >       if (!drm_core_init_complete) {
> > > -             DRM_ERROR("DRM core is not initialized\n");
> > > +             drm_err(NULL, "DRM core is not initialized\n");
> > 
> > Could this use dev ?
> 
> No, the drm_device's dev pointer is assigned later. See line 621.
> 
> > >       if (!vma_offset_manager) {
> > > -             DRM_ERROR("out of memory\n");
> > > +             drm_err(dev, "out of memory\n");
> > 
> > Same here, I think the message could be dropped.
> 
> Okay.
> 
> > >       if (!ht->table) {
> > > -             DRM_ERROR("Out of memory for hash table\n");
> > > +             drm_err(NULL, "Out of memory for hash table\n");
> > 
> > Same.
> 
> Okay.
>  
> > With the commit message fixed as mentioned in the review of an earlier
> > patch in this series, and the issue in drm_dev_init() addressed if
> > needed,
> > 
> > Reviewed-by: Laurent Pinchart laurent.pinchart+renesas at ideasonboard.com>

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list