* [PATCH] staging: atomisp: fix block comment style in refcount.c
@ 2026-03-09 21:55 Oskar Ray-Frayssinet
2026-03-10 11:43 ` Andy Shevchenko
2026-03-10 20:35 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
0 siblings, 2 replies; 4+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-09 21:55 UTC (permalink / raw)
To: hansg, mchehab
Cc: sakari.ailus, andy, gregkh, linux-media, linux-kernel,
linux-staging, Oskar Ray-Frayssinet
Fix block comment formatting to comply with kernel coding style:
- Add leading '*' on continuation lines
- Move trailing '*/' to a separate line
- Remove unnecessary braces around single statement block
Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
.../atomisp/pci/base/refcount/src/refcount.c | 29 ++++++++++---------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
index 58e4e3173b40..00e8a73f413e 100644
--- a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
+++ b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
@@ -16,7 +16,8 @@
#include "ia_css_debug.h"
/* TODO: enable for other memory aswell
- now only for ia_css_ptr */
+ * now only for ia_css_ptr
+ */
struct ia_css_refcount_entry {
u32 count;
ia_css_ptr data;
@@ -93,14 +94,15 @@ void ia_css_refcount_uninit(void)
"%s() entry\n", __func__);
for (i = 0; i < myrefcount.size; i++) {
/* driver verifier tool has issues with &arr[i]
- and prefers arr + i; as these are actually equivalent
- the line below uses + i
- */
+ * and prefers arr + i; as these are actually equivalent
+ * the line below uses + i
+ */
entry = myrefcount.items + i;
if (entry->data != mmgr_NULL) {
/* ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
- "ia_css_refcount_uninit: freeing (%x)\n",
- entry->data);*/
+ * "ia_css_refcount_uninit: freeing (%x)\n",
+ * entry->data);
+ */
hmm_free(entry->data);
entry->data = mmgr_NULL;
entry->count = 0;
@@ -173,7 +175,8 @@ bool ia_css_refcount_decrement(s32 id, ia_css_ptr ptr)
entry->count -= 1;
if (entry->count == 0) {
/* ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
- "ia_css_refcount_decrement: freeing\n");*/
+ * "ia_css_refcount_decrement: freeing\n");
+ */
hmm_free(ptr);
entry->data = mmgr_NULL;
entry->id = 0;
@@ -183,7 +186,8 @@ bool ia_css_refcount_decrement(s32 id, ia_css_ptr ptr)
}
/* SHOULD NOT HAPPEN: ptr not managed by refcount, or not
- valid anymore */
+ * valid anymore
+ */
if (entry)
IA_CSS_ERROR("id %x, ptr 0x%x entry %p entry->id %x entry->count %d\n",
id, ptr, entry, entry->id, entry->count);
@@ -221,9 +225,9 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
for (i = 0; i < myrefcount.size; i++) {
/* driver verifier tool has issues with &arr[i]
- and prefers arr + i; as these are actually equivalent
- the line below uses + i
- */
+ * and prefers arr + i; as these are actually equivalent
+ * the line below uses + i
+ */
entry = myrefcount.items + i;
if ((entry->data != mmgr_NULL) && (entry->id == id)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
@@ -238,9 +242,8 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
hmm_free(entry->data);
}
- if (entry->count != 0) {
+ if (entry->count != 0)
IA_CSS_WARNING("Ref count for entry %x is not zero!", entry->id);
- }
assert(entry->count == 0);
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: atomisp: fix block comment style in refcount.c
2026-03-09 21:55 [PATCH] staging: atomisp: fix block comment style in refcount.c Oskar Ray-Frayssinet
@ 2026-03-10 11:43 ` Andy Shevchenko
2026-03-10 20:35 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-03-10 11:43 UTC (permalink / raw)
To: Oskar Ray-Frayssinet
Cc: hansg, mchehab, sakari.ailus, andy, gregkh, linux-media,
linux-kernel, linux-staging
On Mon, Mar 09, 2026 at 10:55:16PM +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
> - Remove unnecessary braces around single statement block
Are they the only ones to fix in the entire driver?
...
> /* TODO: enable for other memory aswell
> - now only for ia_css_ptr */
> + * now only for ia_css_ptr
> + */
/*
* Please, fix them in a better
* way as depicted by this comment.
*/
...
> /* ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
> - "ia_css_refcount_uninit: freeing (%x)\n",
> - entry->data);*/
> + * "ia_css_refcount_uninit: freeing (%x)\n",
> + * entry->data);
> + */
No, instead use #if 0 ... #endif. Or even better if you find any existing
compile-time definition for that (instead of 0).
...
> /* ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
> - "ia_css_refcount_decrement: freeing\n");*/
> + * "ia_css_refcount_decrement: freeing\n");
> + */
Ditto.
...
> - if (entry->count != 0) {
> + if (entry->count != 0)
> IA_CSS_WARNING("Ref count for entry %x is not zero!", entry->id);
> - }
Make this to be a separate patch, and find more occurrences of a such.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: media: atomisp: fix block comment style in refcount.c
2026-03-09 21:55 [PATCH] staging: atomisp: fix block comment style in refcount.c Oskar Ray-Frayssinet
2026-03-10 11:43 ` Andy Shevchenko
@ 2026-03-10 20:35 ` Oskar Ray-Frayssinet
2026-03-10 22:48 ` Andy Shevchenko
1 sibling, 1 reply; 4+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-10 20:35 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
- Replace commented-out code with #if 0 ... #endif blocks
Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
.../atomisp/pci/base/refcount/src/refcount.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
index 00e8a73f413e..68c3bc181a96 100644
--- a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
+++ b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
@@ -15,7 +15,8 @@
#include "ia_css_debug.h"
-/* TODO: enable for other memory aswell
+/*
+ * TODO: enable for other memory aswell
* now only for ia_css_ptr
*/
struct ia_css_refcount_entry {
@@ -99,10 +100,11 @@ void ia_css_refcount_uninit(void)
*/
entry = myrefcount.items + i;
if (entry->data != mmgr_NULL) {
- /* ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
- * "ia_css_refcount_uninit: freeing (%x)\n",
- * entry->data);
- */
+#if 0
+ ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
+ "ia_css_refcount_uninit: freeing (%x)\n",
+ entry->data);
+#endif
hmm_free(entry->data);
entry->data = mmgr_NULL;
entry->count = 0;
@@ -174,9 +176,10 @@ bool ia_css_refcount_decrement(s32 id, ia_css_ptr ptr)
if (entry->count > 0) {
entry->count -= 1;
if (entry->count == 0) {
- /* ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
- * "ia_css_refcount_decrement: freeing\n");
- */
+#if 0
+ ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
+ "ia_css_refcount_decrement: freeing\n");
+#endif
hmm_free(ptr);
entry->data = mmgr_NULL;
entry->id = 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] staging: media: atomisp: fix block comment style in refcount.c
2026-03-10 20:35 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
@ 2026-03-10 22:48 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-03-10 22:48 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 09:35:46PM +0100, Oskar Ray-Frayssinet wrote:
> 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
> - Replace commented-out code with #if 0 ... #endif blocks
This should be done in a separate patch as this is not about comments.
> Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
> ---
Where is the changelog?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-10 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 21:55 [PATCH] staging: atomisp: fix block comment style in refcount.c Oskar Ray-Frayssinet
2026-03-10 11:43 ` Andy Shevchenko
2026-03-10 20:35 ` [PATCH v2] staging: media: " Oskar Ray-Frayssinet
2026-03-10 22:48 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox