Skip to contentSkip to conversation

staging: media: atomisp: clean up comment formatting and grammar

PATCH In review Bohdan D. Marcus 2 participants 6 messages Jul 10 – Jul 12

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover staging: media: atomisp: clean up comment formatting and grammar

This patch series addresses block comment style and grammar issues in several atomisp files.

Changes in v2:
- Addressed maintainer feedback from v1.
- Split changes into a logical series (headers vs .c file).
- Fixed Doxygen-style comments and line length limits.
- Ensured sentences start with a capital letter and end with a period.

Bohdan D. Marcus (2):
staging: media: atomisp: clean up block comment formatting in headers
staging: media: atomisp: fix grammar and punctuation in inline
comments

 .../staging/media/atomisp/pci/atomisp_cmd.c   | 14 ++---
 .../media/atomisp/pci/atomisp_internal.h      |  5 +-
 .../staging/media/atomisp/pci/ia_css_mipi.h   | 19 +++---
 .../staging/media/atomisp/pci/ia_css_timer.h  | 63 ++++++++++---------
 4 files changed, 52 insertions(+), 49 deletions(-)
Signature · 1 line
2.55.0
#1 lore raw

PATCH v2 1/2 staging: media: atomisp: clean up block comment formatting in headers

Fix block comment formatting issues in several header files to comply with the Linux kernel coding style. Specifically:
- Move trailing '*/' to a separate line.
- Align '*' on subsequent lines of block comments.
- Reformat excessively long lines and remove Doxygen-style tags.

---
 .../media/atomisp/pci/atomisp_internal.h      |  5 +-
 .../staging/media/atomisp/pci/ia_css_mipi.h   | 19 +++---
 .../staging/media/atomisp/pci/ia_css_timer.h  | 63 ++++++++++---------
 3 files changed, 45 insertions(+), 42 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_internal.h +3 -2
index 5a69580b8..3d26b2138 100644
@@ -19,7 +19,7 @@
 #include <media/v4l2-async.h>
 #include <media/v4l2-subdev.h>
 
-/* ISP2400*/
+/* ISP2400 */
 #include "ia_css_types.h"
 #include "sh_css_legacy.h"
 
@@ -182,7 +182,8 @@ struct atomisp_device {
 	struct atomisp_mipi_csi2_device csi2_port[ATOMISP_CAMERA_NR_PORTS];
 
 	/* Purpose of mutex is to protect and serialize use of isp data
-	 * structures and css API calls. */
+	 * structures and css API calls.
+	 */
 	struct mutex mutex;
 
 	/*
drivers/staging/media/atomisp/pci/ia_css_mipi.h +10 -9
index 9fb178c8f..5c803672e 100644
@@ -16,17 +16,18 @@
 #include "ia_css_stream_format.h"
 #include "ia_css_input_port.h"
 
-/* @brief Calculate the size of a mipi frame.
- *
- * @param[in]	width		The width (in pixels) of the frame.
- * @param[in]	height		The height (in lines) of the frame.
- * @param[in]	format		The frame (MIPI) format.
- * @param[in]	hasSOLandEOL	Whether frame (MIPI) contains (optional) SOL and EOF packets.
- * @param[in]	embedded_data_size_words		Embedded data size in memory words.
- * @param		size_mem_words					The mipi frame size in memory words (32B).
- * @return		The error code.
+/**
+ * ia_css_mipi_frame_calculate_size() - Calculate the size of a mipi frame.
+ * @width: The width (in pixels) of the frame.
+ * @height: The height (in lines) of the frame.
+ * @format: The frame (MIPI) format.
+ * @hasSOLandEOL: Whether frame (MIPI) contains (optional) SOL and EOF packets.
+ * @embedded_data_size_words: Embedded data size in memory words.
+ * @size_mem_words: The mipi frame size in memory words (32B).
  *
  * Calculate the size of a mipi frame, based on the resolution and format.
+ *
+ * Return: The error code.
  */
 int
 ia_css_mipi_frame_calculate_size(const unsigned int width,
drivers/staging/media/atomisp/pci/ia_css_timer.h +32 -31

93 lines not on this page · raw message

Signature · 1 line
2.55.0
#2 lore raw

Re: [PATCH v2 1/2] staging: media: atomisp: clean up block comment formatting in headers

Quoted 5 lines · Bohdan D. Marcus

Fix block comment formatting issues in several header files to comply with the Linux kernel coding style. Specifically:
- Move trailing '*/' to a separate line.
- Align '*' on subsequent lines of block comments.
- Reformat excessively long lines and remove Doxygen-style tags.

...

drivers/staging/media/atomisp/pci/atomisp_internal.h struct atomisp_device { · line 186

Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_internal.h +2 -1
 	/* Purpose of mutex is to protect and serialize use of isp data
-	 * structures and css API calls. */
+	 * structures and css API calls.
+	 */

This still has a problem with the style.

...

Have you checked patches by Ricardo Ribalda?

...

Sakari, may you apply Ricardo's first two patches at least, please?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

Re: [PATCH v2 1/2] staging: media: atomisp: clean up block comment formatting in headers

Hi Andy,

Thank you for the review and for catching the style issue with the leading /*.

I just checked Ricardo's recent series ("media: atomisp: Remove doxygen comments") and see that it touches ia_css_timer.h, which overlaps with my Patch 1.

I will wait for Ricardo's series to be merged into the tree first. Once it lands, I will rebase my work, fix the /* block comment style, and send a v3 for any remaining grammar or formatting issues in these files.

Best regards,
Bohdan Derkach

Quoted 30 lines · Andy Shevchenko
Quoted 5 lines · Bohdan D. Marcus

Fix block comment formatting issues in several header files to comply with the Linux kernel coding style. Specifically:
- Move trailing '*/' to a separate line.
- Align '*' on subsequent lines of block comments.
- Reformat excessively long lines and remove Doxygen-style tags.

...

drivers/staging/media/atomisp/pci/atomisp_internal.h struct atomisp_device { · line 186

Quoted 4 lines
      /* Purpose of mutex is to protect and serialize use of isp data
drivers/staging/media/atomisp/pci/atomisp_internal.h +2 -1
-      * structures and css API calls. */
+      * structures and css API calls.
+      */

This still has a problem with the style.

...

Have you checked patches by Ricardo Ribalda?

...

Sakari, may you apply Ricardo's first two patches at least, please?

--
With Best Regards,
Andy Shevchenko

#4 lore raw

PATCH v2 2/2 staging: media: atomisp: fix grammar and punctuation in inline comments

In reply to Bohdan D. Marcus

Update inline comments in atomisp_cmd.c to comply with kernel coding style and maintainer expectations. Specifically:
- Capitalize the first letter of sentences.
- Add missing periods at the end of statements.
- Ensure proper spacing before closing comment tags.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +7 -7
index 6cd500d9f..6a4d04813 100644
@@ -216,7 +216,7 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
 	curr_rules.fps = fps;
 	curr_rules.run_mode = isp->asd.run_mode->val;
 
-	/* search for the target frequency by looping freq rules*/
+	/* Search for the target frequency by looping freq rules. */
 	for (i = 0; i < dfs->dfs_table_size; i++) {
 		if (curr_rules.width != dfs->dfs_table[i].width &&
 		    dfs->dfs_table[i].width != ISP_FREQ_RULE_ANY)
@@ -259,7 +259,7 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
  */
 int atomisp_reset(struct atomisp_device *isp)
 {
-	/* Reset ISP by power-cycling it */
+	/* Reset ISP by power-cycling it. */
 	int ret = 0;
 
 	dev_dbg(isp->dev, "%s\n", __func__);
@@ -420,7 +420,7 @@ static void print_csi_rx_errors(enum mipi_port_id port,
 		dev_err(isp->dev, "  line sync error");
 }
 
-/* Clear irq reg */
+/* Clear irq reg. */
 static void clear_irq_reg(struct atomisp_device *isp)
 {
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
@@ -431,7 +431,7 @@ static void clear_irq_reg(struct atomisp_device *isp)
 	pci_write_config_dword(pdev, PCI_INTERRUPT_CTRL, msg_ret);
 }
 
-/* interrupt handling function*/
+/* Interrupt handling function. */
 irqreturn_t atomisp_isr(int irq, void *dev)
 {
 	struct atomisp_device *isp = (struct atomisp_device *)dev;
@@ -481,7 +481,7 @@ irqreturn_t atomisp_isr(int irq, void *dev)
 
 	if ((irq_infos & IA_CSS_IRQ_INFO_INPUT_SYSTEM_ERROR) ||
 	    (irq_infos & IA_CSS_IRQ_INFO_IF_ERROR)) {
-		/* handle mipi receiver error */
+		/* Handle mipi receiver error. */
 		u32 rx_infos;
 		enum mipi_port_id port;
 
@@ -532,7 +532,7 @@ void atomisp_clear_css_buffer_counters(struct atomisp_sub_device *asd)
 	asd->dis_bufs_in_css = 0;
 }
 
-/* 0x100000 is the start of dmem inside SP */
+/* 0x100000 is the start of dmem inside SP. */
 #define SP_DMEM_BASE	0x100000
 
 void dump_sp_dmem(struct atomisp_device *isp, unsigned int addr,
@@ -614,7 +614,7 @@ void atomisp_flush_video_pipe(struct atomisp_video_pipe *pipe, enum vb2_buffer_s
 	spin_unlock_irqrestore(&pipe->irq_lock, irqflags);
 }
 
-/* clean out the parameters that did not apply */
+/* Clean out the parameters that did not apply. */
 void atomisp_flush_params_queue(struct atomisp_video_pipe *pipe)
 {
 	struct atomisp_css_params_with_list *param;
Signature · 1 line
2.55.0
#5 lore raw

Re: [PATCH v2 2/2] staging: media: atomisp: fix grammar and punctuation in inline comments

Quoted 5 lines · Bohdan D. Marcus

Update inline comments in atomisp_cmd.c to comply with kernel coding style and maintainer expectations. Specifically:
- Capitalize the first letter of sentences.
- Add missing periods at the end of statements.
- Ensure proper spacing before closing comment tags.

Nice, but the same question as per previous patch.

Signature · 2 lines
With Best Regards,
Andy Shevchenko