public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: atomisp: fix block comment style in circbuf.c
@ 2026-03-09 21:30 Oskar Ray-Frayssinet
  2026-03-10 13:21 ` Sakari Ailus
  2026-03-10 15:16 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
  0 siblings, 2 replies; 5+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-09 21:30 UTC (permalink / raw)
  To: hansg, gregkh
  Cc: mchehab, sakari.ailus, linux-media, linux-staging, linux-kernel,
	Oskar Ray-Frayssinet

Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
 .../media/atomisp/pci/base/circbuf/src/circbuf.c  | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
index cb34d0b5abb5..db0b76ea4a29 100644
--- a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
+++ b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
@@ -192,9 +192,9 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
  * Please refer to "ia_css_circbuf.h" for details.
  */
 bool ia_css_circbuf_increase_size(
-    ia_css_circbuf_t *cb,
-    unsigned int sz_delta,
-    ia_css_circbuf_elem_t *elems)
+	ia_css_circbuf_t *cb,
+	unsigned int sz_delta,
+	ia_css_circbuf_elem_t *elems)
 {
 	u8 curr_size;
 	u8 curr_end;
@@ -206,7 +206,8 @@ bool ia_css_circbuf_increase_size(
 	curr_size = cb->desc->size;
 	curr_end = cb->desc->end;
 	/* We assume cb was pre defined as global to allow
-	 * increase in size */
+	 * increase in size
+	 */
 	/* FM: are we sure this cannot cause size to become too big? */
 	if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) &&
 	    ((uint8_t)sz_delta == sz_delta))
@@ -215,12 +216,14 @@ bool ia_css_circbuf_increase_size(
 		return false; /* overflow in size */
 
 	/* If elems are passed update them else we assume its been taken
-	 * care before calling this function */
+	 * care before calling this function
+	 */
 	if (elems) {
 		/* cb element array size will not be increased dynamically,
 		 * but pointers to new elements can be added at the end
 		 * of existing pre defined cb element array of
-		 * size >= new size if not already added */
+		 * size >= new size if not already added
+		 */
 		for (i = curr_size; i <  cb->desc->size; i++)
 			cb->elems[i] = elems[i - curr_size];
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: atomisp: fix block comment style in circbuf.c
  2026-03-09 21:30 [PATCH] staging: atomisp: fix block comment style in circbuf.c Oskar Ray-Frayssinet
@ 2026-03-10 13:21 ` Sakari Ailus
  2026-03-10 15:16 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
  1 sibling, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2026-03-10 13:21 UTC (permalink / raw)
  To: Oskar Ray-Frayssinet
  Cc: hansg, gregkh, mchehab, linux-media, linux-staging, linux-kernel

Hi Oskar,

On Mon, Mar 09, 2026 at 10:30:24PM +0100, Oskar Ray-Frayssinet wrote:

A more elaborate description of the patch goes here.

> Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
> ---
>  .../media/atomisp/pci/base/circbuf/src/circbuf.c  | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
> index cb34d0b5abb5..db0b76ea4a29 100644
> --- a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
> +++ b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
> @@ -192,9 +192,9 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
>   * Please refer to "ia_css_circbuf.h" for details.
>   */
>  bool ia_css_circbuf_increase_size(
> -    ia_css_circbuf_t *cb,
> -    unsigned int sz_delta,
> -    ia_css_circbuf_elem_t *elems)
> +	ia_css_circbuf_t *cb,
> +	unsigned int sz_delta,
> +	ia_css_circbuf_elem_t *elems)

You could improve this more.

>  {
>  	u8 curr_size;
>  	u8 curr_end;
> @@ -206,7 +206,8 @@ bool ia_css_circbuf_increase_size(
>  	curr_size = cb->desc->size;
>  	curr_end = cb->desc->end;
>  	/* We assume cb was pre defined as global to allow
> -	 * increase in size */
> +	 * increase in size
> +	 */
>  	/* FM: are we sure this cannot cause size to become too big? */
>  	if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) &&
>  	    ((uint8_t)sz_delta == sz_delta))
> @@ -215,12 +216,14 @@ bool ia_css_circbuf_increase_size(
>  		return false; /* overflow in size */
>  
>  	/* If elems are passed update them else we assume its been taken

/*
 * Multi-line
 * comment.
 */

> -	 * care before calling this function */
> +	 * care before calling this function
> +	 */
>  	if (elems) {
>  		/* cb element array size will not be increased dynamically,
>  		 * but pointers to new elements can be added at the end
>  		 * of existing pre defined cb element array of
> -		 * size >= new size if not already added */
> +		 * size >= new size if not already added
> +		 */
>  		for (i = curr_size; i <  cb->desc->size; i++)
>  			cb->elems[i] = elems[i - curr_size];
>  	}

-- 
Regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] staging: media: atomisp: fix block comment style in circbuf.c
  2026-03-09 21:30 [PATCH] staging: atomisp: fix block comment style in circbuf.c Oskar Ray-Frayssinet
  2026-03-10 13:21 ` Sakari Ailus
@ 2026-03-10 15:16 ` Oskar Ray-Frayssinet
  2026-03-10 15:44   ` Andy Shevchenko
  2026-03-10 19:15   ` [PATCH v3] " Oskar Ray-Frayssinet
  1 sibling, 2 replies; 5+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-10 15:16 UTC (permalink / raw)
  To: hansg, mchehab
  Cc: sakari.ailus, andy, gregkh, linux-media, linux-staging,
	linux-kernel, Oskar Ray-Frayssinet

Fix block comment formatting to comply with kernel coding style:
- Add leading '*' on continuation lines
- Move trailing '*/' to a separate line

Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
 .../media/atomisp/pci/base/circbuf/src/circbuf.c  | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
index cb34d0b5abb5..db0b76ea4a29 100644
--- a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
+++ b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
@@ -192,9 +192,9 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
  * Please refer to "ia_css_circbuf.h" for details.
  */
 bool ia_css_circbuf_increase_size(
-    ia_css_circbuf_t *cb,
-    unsigned int sz_delta,
-    ia_css_circbuf_elem_t *elems)
+	ia_css_circbuf_t *cb,
+	unsigned int sz_delta,
+	ia_css_circbuf_elem_t *elems)
 {
 	u8 curr_size;
 	u8 curr_end;
@@ -206,7 +206,8 @@ bool ia_css_circbuf_increase_size(
 	curr_size = cb->desc->size;
 	curr_end = cb->desc->end;
 	/* We assume cb was pre defined as global to allow
-	 * increase in size */
+	 * increase in size
+	 */
 	/* FM: are we sure this cannot cause size to become too big? */
 	if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) &&
 	    ((uint8_t)sz_delta == sz_delta))
@@ -215,12 +216,14 @@ bool ia_css_circbuf_increase_size(
 		return false; /* overflow in size */
 
 	/* If elems are passed update them else we assume its been taken
-	 * care before calling this function */
+	 * care before calling this function
+	 */
 	if (elems) {
 		/* cb element array size will not be increased dynamically,
 		 * but pointers to new elements can be added at the end
 		 * of existing pre defined cb element array of
-		 * size >= new size if not already added */
+		 * size >= new size if not already added
+		 */
 		for (i = curr_size; i <  cb->desc->size; i++)
 			cb->elems[i] = elems[i - curr_size];
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] staging: media: atomisp: fix block comment style in circbuf.c
  2026-03-10 15:16 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
@ 2026-03-10 15:44   ` Andy Shevchenko
  2026-03-10 19:15   ` [PATCH v3] " Oskar Ray-Frayssinet
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-03-10 15:44 UTC (permalink / raw)
  To: Oskar Ray-Frayssinet
  Cc: hansg, mchehab, sakari.ailus, andy, gregkh, linux-media,
	linux-staging, linux-kernel

On Tue, Mar 10, 2026 at 04:16:20PM +0100, Oskar Ray-Frayssinet wrote:
> Fix block comment formatting to comply with kernel coding style:
> - Add leading '*' on continuation lines
> - Move trailing '*/' to a separate line

You fixed something new I haven't asked for in v1 and you missed completely my
point in v1 review.

Try again.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3] staging: media: atomisp: fix block comment style in circbuf.c
  2026-03-10 15:16 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
  2026-03-10 15:44   ` Andy Shevchenko
@ 2026-03-10 19:15   ` Oskar Ray-Frayssinet
  1 sibling, 0 replies; 5+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-10 19:15 UTC (permalink / raw)
  To: hansg, mchehab
  Cc: sakari.ailus, andy, gregkh, linux-media, linux-staging,
	linux-kernel, Oskar Ray-Frayssinet

Fix block comment formatting to comply with kernel coding style:
- Move text from opening '/*' line to a separate continuation line
- Add leading '*' on continuation lines
- Move trailing '*/' to a separate line

Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
 .../media/atomisp/pci/base/circbuf/src/circbuf.c     | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
index db0b76ea4a29..51bdfe64491e 100644
--- a/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
+++ b/drivers/staging/media/atomisp/pci/base/circbuf/src/circbuf.c
@@ -186,7 +186,8 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
 	return cb->elems[pos].val;
 }
 
-/* @brief increase size of a circular buffer.
+/*
+ * @brief increase size of a circular buffer.
  * Use 'CAUTION' before using this function. This was added to
  * support / fix issue with increasing size for tagger only
  * Please refer to "ia_css_circbuf.h" for details.
@@ -205,7 +206,8 @@ bool ia_css_circbuf_increase_size(
 
 	curr_size = cb->desc->size;
 	curr_end = cb->desc->end;
-	/* We assume cb was pre defined as global to allow
+	/*
+	 * We assume cb was pre defined as global to allow
 	 * increase in size
 	 */
 	/* FM: are we sure this cannot cause size to become too big? */
@@ -215,11 +217,13 @@ bool ia_css_circbuf_increase_size(
 	else
 		return false; /* overflow in size */
 
-	/* If elems are passed update them else we assume its been taken
+	/*
+	 * If elems are passed update them else we assume its been taken
 	 * care before calling this function
 	 */
 	if (elems) {
-		/* cb element array size will not be increased dynamically,
+		/*
+		 * cb element array size will not be increased dynamically,
 		 * but pointers to new elements can be added at the end
 		 * of existing pre defined cb element array of
 		 * size >= new size if not already added
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-10 19:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 21:30 [PATCH] staging: atomisp: fix block comment style in circbuf.c Oskar Ray-Frayssinet
2026-03-10 13:21 ` Sakari Ailus
2026-03-10 15:16 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
2026-03-10 15:44   ` Andy Shevchenko
2026-03-10 19:15   ` [PATCH v3] " Oskar Ray-Frayssinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox