[PATCH v10 07/17] media: mali-c55: Add Mali-C55 ISP driver

Sakari Ailus sakari.ailus at linux.intel.com
Mon Jun 30 03:29:16 PDT 2025


On Mon, Jun 30, 2025 at 11:35:19AM +0300, Laurent Pinchart wrote:
> > > > > +#define MALI_C55_ISP_RAW_BYPASS_FR_BYPASS_MASK		GENMASK(9, 8)
> > > > > +#define MALI_C55_ISP_RAW_BYPASS_RAW_FR_BYPASS		(2 << 8)
> > > > > +#define MALI_C55_ISP_RAW_BYPASS_RGB_FR_BYPASS		(1 << 8)
> > > > 
> > > > BIT() or make these unsigned.
> > > 
> > > It's a 2 bits field, BIT() isn't appropriate.
> > 
> > That leaves us with the other alternative, doesn't it?
> 
> Absolutely, although unsigned is unnecessary in this case as we're not
> approaching bit 31.

I agree with that, but what I really meant was that the pattern of using
signed integers while shifting left itself is bad. Not everyone is aware
of the problem and if we can steer them to use a different pattern, we can
avoid bugs.

-- 
Sakari Ailus



More information about the linux-arm-kernel mailing list