Skip to contentSkip to conversation

drm: Add directive to format code in comment

PATCH Superseded Javier Garcia 5 participants 12 messages Aug 4, 2025 – Aug 15, 2025

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

PATCH 1/1 drm: Add directive to format code in comment

Fixes the warnings:

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

---
 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_gpuvm.c +2 -0
index bbc7fecb6f4a..74d949995a72 100644
@@ -2432,6 +2432,8 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
+ * .. code-block:: c
+ *
  *    vm_bind {
  *        struct drm_exec exec;
  *
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Javier Garcia

Fixes the warnings:

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Quoted 5 lines
---
 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)

Fixes tag?

Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
Quoted 24 lines · Dmitry Baryshkov
Quoted 4 lines · Javier Garcia

Fixes the warnings:

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without

a blank line; unexpected unindent.

Quoted 1 line

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends

without a blank line; unexpected unindent.

Quoted 1 line

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends

without a blank line; unexpected unindent.

Quoted 2 lines

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends

without a blank line; unexpected unindent.

Quoted 1 line

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends

without a blank line; unexpected unindent.

Quoted 1 line

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends

without a blank line; unexpected unindent.

Quoted 6 lines
---
 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 4 lines

Fixes tag?

Sorry, what do you mean?

Quoted 5 lines

--
With best wishes
Dmitry

#3 lore raw
In reply to Dmitry Baryshkov
Quoted 19 lines · Dmitry Baryshkov
Quoted 11 lines · Javier Garcia

Fixes the warnings:

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Quoted 5 lines
---
 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 3 lines

Fixes tag?

Sorry, what do you mean?

Quoted 4 lines

--
With best wishes
Dmitry

#4 lore raw
Quoted 4 lines · Giant Sand Fans
Quoted 1 line · Dmitry Baryshkov

Fixes tag?

Sorry, what do you mean?

Dmitry is looking for a tag in the body of your patch (much like your "Signed-off-by" tag) which describes the commit which introduced the bad behavior[1]. In this case, it looks like this block was introduced with the incorrect kerneldoc code block formatting by commit 471920ce25d5, so the correct Fixes tag would look like the following:

Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

[1]: https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

Cheers,
Brigham

#5 lore raw
Quoted 4 lines · Brigham Campbell
Quoted 2 lines · Giant Sand Fans

On Tue, 5 Aug 2025 at 12:49, Dmitry Baryshkov
<[email protected]> wrote:

Quoted 8 lines
Quoted 2 lines
Quoted 1 line

Fixes tag?

Sorry, what do you mean?

Dmitry is looking for a tag in the body of your patch (much like your "Signed-off-by" tag) which describes the commit which introduced the bad behavior[1]. In this case, it looks like this block was introduced with the incorrect kerneldoc code block formatting by commit 471920ce25d5, so the correct Fixes tag would look like the following:

oh, thank you .

Quoted 2 lines
Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

Yes, this is it.

Quoted 8 lines

[1]: https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

Cheers,
Brigham

#6 lore raw

PATCH v2 1/1 drm: Add directive to format code in comment

In reply to Dmitry Baryshkov
Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

---
v1 -> v2:
* Added the proper Fixes tag.
* v1 https://lore.kernel.org/lkml/[email protected]

 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_gpuvm.c +2 -0
index bbc7fecb6f4a..74d949995a72 100644
@@ -2432,6 +2432,8 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
+ * .. code-block:: c
+ *
  *    vm_bind {
  *        struct drm_exec exec;
  *
Signature · 1 line
2.50.1
maintainer
#7 lore raw

Hi Javier,

On Sun Aug 10, 2025 at 1:22 PM CEST, Javier Garcia wrote:

Thanks for the patch.

Quoted 1 line
Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

The Fixes: tag belongs at the end of the commit message, like all other tags.

Quoted 8 lines

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Even though it's rather obvious in this case, the commit message should contain the motivation of the patch and how it addresses the issue in imperative mood, see also [1].

[1] https://docs.kernel.org/process/submitting-patches.html#describe-your-changes

Quoted 26 lines

---
v1 -> v2:
* Added the proper Fixes tag.
* v1 https://lore.kernel.org/lkml/[email protected]

 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_gpuvm.c +2 -0
index bbc7fecb6f4a..74d949995a72 100644
@@ -2432,6 +2432,8 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
+ * .. code-block:: c
+ *
  *    vm_bind {
  *        struct drm_exec exec;
  *
Signature · 1 line
2.50.1
#8 lore raw
Quoted 10 lines · Danilo Krummrich

Hi Javier,

On Sun Aug 10, 2025 at 1:22 PM CEST, Javier Garcia wrote:

Thanks for the patch.

Quoted 1 line
Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

The Fixes: tag belongs at the end of the commit message, like all other tags.

Thanks

Quoted 10 lines
Quoted 9 lines

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Quoted 3 lines

Even though it's rather obvious in this case, the commit message should contain the motivation of the patch and how it addresses the issue in imperative mood, see also [1].

Thanks

Quoted 30 lines

[1] https://docs.kernel.org/process/submitting-patches.html#describe-your-changes

Quoted 26 lines

---
v1 -> v2:
* Added the proper Fixes tag.
* v1 https://lore.kernel.org/lkml/[email protected]

 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_gpuvm.c +2 -1
index bbc7fecb6f4a..74d949995a72 100644
@@ -2432,6 +2432,8 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
+ * .. code-block:: c
+ *
  *    vm_bind {
  *        struct drm_exec exec;
  *
--

2.50.1

#9 lore raw

PATCH v3 1/1 drm: Add directive to format code in comment

In reply to Danilo Krummrich

Add formating directive line in function drm_gpuvm_sm_map_exec_lock() comment to clear warning messages shown bellow that appears generating documentation make htmldocs.

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

---
v2 -> v3:
* Added the proper imperative message.
* Fixes tag possition.
* v2 https://lore.kernel.org/lkml/[email protected]

v1 -> v2:
* Added the proper Fixes tag.
* v1 https://lore.kernel.org/lkml/[email protected]

 drivers/gpu/drm/drm_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_gpuvm.c +2 -0
index bbc7fecb6f4a..74d949995a72 100644
@@ -2432,6 +2432,8 @@ static const struct drm_gpuvm_ops lock_ops = {
  *
  * The expected usage is:
  *
+ * .. code-block:: c
+ *
  *    vm_bind {
  *        struct drm_exec exec;
  *
Signature · 1 line
2.50.1
Reviewed-by on v3 1/1
#10 lore raw
Quoted 7 lines · Javier Garcia

* The expected usage is:
*
+ * .. code-block:: c
+ *
* vm_bind {
* struct drm_exec exec;
*

LGTM, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer Applied
#11 lore raw
In reply to Javier Garcia
Quoted 13 lines · Javier Garcia

Add formating directive line in function drm_gpuvm_sm_map_exec_lock() comment to clear warning messages shown bellow that appears generating documentation make htmldocs.

Warning: ./drivers/gpu/drm/drm_gpuvm.c:2444: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2446: Block quote ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2450: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2451: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2455: Unexpected indentation.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2456: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2457: Definition list ends without a blank line; unexpected unindent.
Warning: ./drivers/gpu/drm/drm_gpuvm.c:2458: Definition list ends without a blank line; unexpected unindent.

Quoted 2 lines
Fixes 471920ce25d5 ("drm/gpuvm: Add locking helpers")

Applied to drm-misc-fixes, thanks!