Re: [PATCH] staging: media: atomisp: Fix typos and comments alignment issue in include/linux/* header files

From: Andy Shevchenko

Date: Sat Nov 29 2025 - 08:46:20 EST


On Sat, Nov 29, 2025 at 11:12:28AM +0500, Hamdan Khan wrote:
> This patch fixes minor comment and code alignment issues in
> atomisp/include/linux/*.h header files. Some of them were warnings
> generated by checkpatch.pl (missing * at the start of the line or */
> present in the same line)

...

> - int matrix[3 * 3]; /* RGB2YUV Color matrix, signed
> - <13-fraction_bits>.<fraction_bits> */
> + /* RGB2YUV Color matrix, signed
> + * <13-fraction_bits>.<fraction_bits>
> + */

/*
* This comment has to follow the common rules for
* multi-line comments. Use this as an example.
*/

...

> + /*
> + * the frame containing the overlay data The overlay frame width should

This becomes even worse. Fix the English text properly.

> * be the multiples of 2*ISP_VEC_NELEMS. The overlay frame height
> * should be the multiples of 2.
> */

...

> /* the overlay start x pixel position on output frame It should be the
> - multiples of 2*ISP_VEC_NELEMS. */
> + * multiples of 2*ISP_VEC_NELEMS.
> + */

The same as per two above comments.

...

> /* the overlay start y pixel position on output frame It should be the
> - multiples of 2. */
> + * multiples of 2.
> + */

Ditto.

> /* CSI2-MIPI specific format: YUV data.
> */
> - ATOMISP_INPUT_FORMAT_YUV420_8_SHIFT, /* YUV420 8-bit (Chroma Shifted
> - Pixel Sampling) */
> - ATOMISP_INPUT_FORMAT_YUV420_10_SHIFT, /* YUV420 8-bit (Chroma Shifted
> - Pixel Sampling) */
> + ATOMISP_INPUT_FORMAT_YUV420_8_SHIFT, /* YUV420 8-bit (Chroma Shifted
> + * Pixel Sampling)
> + */
> + ATOMISP_INPUT_FORMAT_YUV420_10_SHIFT, /* YUV420 10-bit (Chroma Shifted
> + * Pixel Sampling)
> + */

Still not good. Make the comments to lead the definitions and also fix

/* CSI2-MIPI specific format: YUV data. */
...
/* YUV420 10-bit (Chroma Shifted Pixel Sampling) */
ATOMISP_INPUT_FORMAT_YUV420_10_SHIFT,

> /* CSI2-MIPI specific format: Generic long packet data
> */

As per above.

You need to fix _all_ of them, do not leave the job half done.

...

> /*
> - * Sensor of external ISP can send multiple streams with different mipi data
> + * Sensor of external ISP can send multiple streams with different mipi data

MIPI

> * type in the same virtual channel. This information needs to come from the
> * sensor or external ISP

The sentence misses period at the end.

> */

...

> /* Sensor driver fills ch_id with the id
> - of the virtual channel. */
> + * of the virtual channel.
> + */

> /* Tells how many streams in this virtual channel. If 0 ignore rest
> - * and the input format will be from mipi_info */
> + * and the input format will be from mipi_info
> + */

> - /*
> - * if more isys_configs is more than 0, sensor needs to configure the
> + /* If isys_configs is more than 0, sensor needs to configure the
> * input format differently. width and height can be 0. If width and
> * height is not zero, then the corresponding data needs to be set
> */

All the above must be fixed properly.

...

TL:DR; this patch needs much more work. Take your time, the driver
is not so small. OTOH you can take one part of it and do this there.
I dunno if fixing one header subfolder is good enough, we may start
from it, but again, fix all problems, don't leave it in semi-baked
state.

--
With Best Regards,
Andy Shevchenko