[PATCH v2 3/5] media: mali-c55: Add Mali-C55 ISP driver

Sakari Ailus sakari.ailus at iki.fi
Wed Feb 28 05:11:39 PST 2024


Hi Jacopo,

On Wed, Feb 28, 2024 at 01:50:14PM +0100, Jacopo Mondi wrote:
> > > +const struct mali_c55_fmt *mali_c55_cap_fmt_next(const struct mali_c55_fmt *fmt,
> > > +						 bool allow_raw, bool unique)
> > > +{
> > > +	if (!fmt)
> > > +		fmt = &mali_c55_fmts[0];
> > > +	else
> > > +		++fmt;
> >
> > fmt++, please.
> >
> 
> Can I ask why ? (here and in the next occurrences you have reported)

It's much, much more common and using that form makes the code easier to
read. The rest of the driver primarily uses variable++, too, AFAIR.

So you should use ++variable only when you need it.

-- 
Sakari Ailus



More information about the linux-arm-kernel mailing list