[PATCH v3 06/13] media: imx-mipi-csis: Use GENMASK for all register field masks
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Aug 22 07:40:00 PDT 2025
Hi Frank,
On Fri, Aug 22, 2025 at 10:13:34AM -0400, Frank Li wrote:
> On Fri, Aug 22, 2025 at 03:27:26AM +0300, Laurent Pinchart wrote:
> > Multiple register field mask macros use GENMASK, while other define the
> > mask value manually. Standardize on GENMASK everywhere, as well as on
> > the _MASK suffix to name the macros. This improves consistency and helps
> > with readability.
> >
> > No functional change is intended.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> > drivers/media/platform/nxp/imx-mipi-csis.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
> > index ce889c436cb1..50f6f4468f7b 100644
> > --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> > +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> > @@ -57,7 +57,7 @@
>
> ...
> >
> > /* ISP Image Resolution register */
> > #define MIPI_CSIS_ISP_RESOL_CH(n) (0x44 + (n) * 0x10)
> > @@ -655,7 +655,7 @@ static void mipi_csis_set_params(struct mipi_csis_device *csis,
> > val = mipi_csis_read(csis, MIPI_CSIS_CLK_CTRL);
> > val |= MIPI_CSIS_CLK_CTRL_WCLK_SRC;
> > val |= MIPI_CSIS_CLK_CTRL_CLKGATE_TRAIL_CH0(15);
> > - val &= ~MIPI_CSIS_CLK_CTRL_CLKGATE_EN_MSK;
> > + val &= ~MIPI_CSIS_CLK_CTRL_CLKGATE_EN_MASK;
>
> nit: if need create new verison, I suggest add "change MSK to MASK"
> informaiton at commit message.
The information is there already, the commit message already states
"Standardize [...] on the _MASK suffix to name the macros".
> Reviewed-by: Frank Li <Frank.Li at nxp.com>
>
> > mipi_csis_write(csis, MIPI_CSIS_CLK_CTRL, val);
> >
> > mipi_csis_write(csis, MIPI_CSIS_DPHY_BCTRL_L,
--
Regards,
Laurent Pinchart
More information about the linux-arm-kernel
mailing list