Re: [PATCH v2 2/4] staging: media: atomisp: inline macros for checking the bo/bodev pointer

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-media,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Wed, Aug 12, 2026 at 10:49:17AM +0300, Andy Shevchenko wrote:
> On Thu, Jul 23, 2026 at 09:51:19PM +0300, Nikolay Kulikov wrote:

...

> > struct hmm_buffer_object *hmm_bo_alloc(struct hmm_bo_device *bdev,
> >  				       unsigned int pgnr)
> >  {
> >  	struct hmm_buffer_object *bo, *new_bo;
> > -	struct rb_root *root = &bdev->free_rbtree;
> > +	struct rb_root *root;
> > +
> > +	if (!bdev) {
> > +		dev_err(atomisp_dev, "NULL hmm_bo_device.\n");
> > +		return NULL;
> > +	}
> >  
> > -	check_bodev_null_return(bdev, NULL);
> > +	root = &bdev->free_rbtree;
> >  	var_equal_return(hmm_bo_device_inited(bdev), 0, NULL,
> >  			 "hmm_bo_device not inited yet.\n");
> 
> While at it, also replace here var_equal_return() with appropriate C code.

Ah, it's done in the last patch!

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.