Skip to contentSkip to conversation

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

PATCH Superseded Hamdan Khan 2 participants 2 messages Nov 29, 2025

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

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)

The changes are code-style related only and don't affect the functionality.

---
 .../media/atomisp/include/linux/atomisp.h     | 30 +++++++++++--------
 .../include/linux/atomisp_gmin_platform.h     |  7 ++---
 .../atomisp/include/linux/atomisp_platform.h  | 21 +++++++------
 3 files changed, 32 insertions(+), 26 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp.h +17 -13
index 3c8fa3f5808d..bce4e5f1bfc7 100644
@@ -146,8 +146,7 @@ struct atomisp_3a_config {
 	unsigned int ae_y_coef_r;	/* [gain] Weight of R for Y */
 	unsigned int ae_y_coef_g;	/* [gain] Weight of G for Y */
 	unsigned int ae_y_coef_b;	/* [gain] Weight of B for Y */
-	unsigned int awb_lg_high_raw;	/* [intensity]
-					   AWB level gate high for raw */
+	unsigned int awb_lg_high_raw;	/* [intensity] AWB level gate high for raw */
 	unsigned int awb_lg_low;	/* [intensity] AWB level gate low */
 	unsigned int awb_lg_high;	/* [intensity] AWB level gate high */
 	int af_fir1_coef[7];	/* [factor] AF FIR coefficients of fir1 */
@@ -272,8 +271,10 @@ struct atomisp_wb_config {
 /* Color Space Conversion settings */
 struct atomisp_cc_config {
 	unsigned int fraction_bits;
-	int matrix[3 * 3];	/* RGB2YUV Color matrix, signed
-				   <13-fraction_bits>.<fraction_bits> */
+	/* RGB2YUV Color matrix, signed
+	 * <13-fraction_bits>.<fraction_bits>
+	 */
+	int matrix[3 * 3];
 };
 
 /* De pixel noise configuration */
@@ -425,10 +426,8 @@ struct atomisp_parameters {
 	struct atomisp_3a_config   *a3a_config; /* 3A Statistics config */
 	struct atomisp_xnr_config  *xnr_config; /* eXtra Noise Reduction */
 	struct atomisp_dz_config   *dz_config;  /* Digital Zoom */
-	struct atomisp_cc_config *yuv2rgb_cc_config; /* Color
-							Correction config */
-	struct atomisp_cc_config *rgb2yuv_cc_config; /* Color
-							Correction config */
+	struct atomisp_cc_config *yuv2rgb_cc_config; /* Color Correction config */
+	struct atomisp_cc_config *rgb2yuv_cc_config; /* Color Correction config */
 	struct atomisp_macc_table  *macc_table;
 	struct atomisp_gamma_table *gamma_table;
 	struct atomisp_ctc_table   *ctc_table;
@@ -538,7 +537,8 @@ struct atomisp_ctc_table {
 
 /* Parameter for overlay image loading */
 struct atomisp_overlay {
-	/* the frame containing the overlay data The overlay frame width should
+	/*
+	 * the frame containing the overlay data The overlay frame width should
 	 * be the multiples of 2*ISP_VEC_NELEMS. The overlay frame height
 	 * should be the multiples of 2.
 	 */
@@ -562,10 +562,12 @@ struct atomisp_overlay {
 	/* the blending percent of overlay data for V subpixels */
 	unsigned char blend_overlay_perc_v;
 	/* 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.
+	 */
 	unsigned int overlay_start_x;
 	/* the overlay start y pixel position on output frame It should be the
-	   multiples of 2. */
+	 * multiples of 2.
+	 */
 	unsigned int overlay_start_y;
 };
 
@@ -836,8 +838,10 @@ enum atomisp_burst_capture_options {
 #define V4L2_CID_ATOMISP_LOW_LIGHT \
 	(V4L2_CID_PRIVATE_BASE + 5)
 
-/* Camera class:
- * Exposure, Flash and privacy (indicator) light controls, to be upstreamed */
+/*
+ * Camera class:
+ * Exposure, Flash and privacy (indicator) light controls, to be upstreamed
+ */
 #define V4L2_CID_CAMERA_LASTP1             (V4L2_CID_CAMERA_CLASS_BASE + 1024)
 
 #define V4L2_CID_RUN_MODE			(V4L2_CID_CAMERA_LASTP1 + 20)
drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h +3 -4
index 426c5ee4ec18..415b265505c7 100644
@@ -15,8 +15,7 @@ int atomisp_gmin_remove_subdev(struct v4l2_subdev *sd);
 int gmin_get_var_int(struct device *dev, bool is_gmin,
 		     const char *var, int def);
 struct camera_sensor_platform_data *
-gmin_camera_platform_data(
-    struct v4l2_subdev *subdev,
-    enum atomisp_input_format csi_format,
-    enum atomisp_bayer_order csi_bayer);
+gmin_camera_platform_data(struct v4l2_subdev *subdev,
+			  enum atomisp_input_format csi_format,
+			  enum atomisp_bayer_order csi_bayer);
 #endif
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +12 -9
index 6146555fe9cf..2378a21ee961 100644
@@ -72,10 +72,12 @@ enum atomisp_input_format {
 
 	/* 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)
+						*/
 
 	/* CSI2-MIPI specific format: Generic long packet data
 	 */
@@ -105,7 +107,7 @@ struct intel_v4l2_subdev_table {
 };
 
 /*
- *  Sensor of external ISP can send multiple streams with different mipi data
+ * Sensor of external ISP can send multiple streams with different mipi data
  * type in the same virtual channel. This information needs to come from the
  * sensor or external ISP
  */
@@ -119,13 +121,14 @@ struct atomisp_input_stream_info {
 	enum atomisp_input_stream_id stream;
 	u8 enable;
 	/* Sensor driver fills ch_id with the id
-	   of the virtual channel. */
+	 * of the virtual channel.
+	 */
 	u8 ch_id;
 	/* 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
+	 */
 	u8 isys_configs;
-	/*
-	 * 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
 	 */
Signature · 1 line
2.43.0
#1 lore raw
Quoted 4 lines · Hamdan Khan

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)

...

drivers/staging/media/atomisp/include/linux/atomisp.h struct atomisp_wb_config { · line 276

Quoted 5 lines
drivers/staging/media/atomisp/include/linux/atomisp.h +3 -2
-	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. */

...

drivers/staging/media/atomisp/include/linux/atomisp.h struct atomisp_ctc_table { · line 541

Quoted 2 lines
drivers/staging/media/atomisp/include/linux/atomisp.h +2 -0
+	/*
+	 * the frame containing the overlay data The overlay frame width should

This becomes even worse. Fix the English text properly.

Quoted 3 lines
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -0
 	 * be the multiples of 2*ISP_VEC_NELEMS. The overlay frame height
 	 * should be the multiples of 2.
 	 */

...

drivers/staging/media/atomisp/include/linux/atomisp.h struct atomisp_overlay { · line 566

Quoted 4 lines
drivers/staging/media/atomisp/include/linux/atomisp.h +2 -1
 	/* 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.

...

drivers/staging/media/atomisp/include/linux/atomisp.h struct atomisp_overlay { · line 570

Quoted 4 lines
drivers/staging/media/atomisp/include/linux/atomisp.h +2 -1
 	/* the overlay start y pixel position on output frame It should be the
-	   multiples of 2. */
+	 * multiples of 2.
+	 */

Ditto.

drivers/staging/media/atomisp/include/linux/atomisp_platform.h enum atomisp_input_format { · line 80

Quoted 12 lines
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +6 -4
 	/* 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,

drivers/staging/media/atomisp/include/linux/atomisp_platform.h enum atomisp_input_format { · line 83

Quoted 2 lines
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +0 -0
 	/* 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.

...

Quoted 3 lines

/*
- * 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

Quoted 2 lines

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

The sentence misses period at the end.

Quoted 1 line

*/

...

Quoted 6 lines
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +2 -1
 	/* 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

drivers/staging/media/atomisp/include/linux/atomisp_platform.h struct atomisp_input_stream_info { · line 134

Quoted 10 lines
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +3 -3
-	 * 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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko