Skip to contentSkip to conversation

genpt documentation fixes

PATCH Applied Bagas Sanjaya 3 participants 7 messages Nov 7, 2025

Subsystems (2)
lore
Share & tools
lore
#2 lore raw

PATCH v2 2/2 iommupt: Describe @bitnr parameter

In reply to Bagas Sanjaya

Sphinx reports kernel-doc warnings when making htmldocs:

WARNING: ./drivers/iommu/generic_pt/pt_common.h:361 function parameter 'bitnr' not described in 'pt_test_sw_bit_acquire'
WARNING: ./drivers/iommu/generic_pt/pt_common.h:371 function parameter 'bitnr' not described in 'pt_set_sw_bit_release'

Describe @bitnr to squash them.

Fixes bcc64b57b48e ("iommupt: Add basic support for SW bits in the page table")
---
 drivers/iommu/generic_pt/pt_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/iommu/generic_pt/pt_common.h +2 -0
index b5628f47e0db40..3b4e371089140a 100644
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to read
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a test bit and acquire operation.
@@ -364,6 +365,7 @@ static inline bool pt_test_sw_bit_acquire(struct pt_state *pts,
 /**
  * pt_set_sw_bit_release() - Set a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to read
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a set bit and release operation.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH v2 1/2 Documentation: genpt: Don't use code block marker before iommu_amdv1.c include listing

In reply to Bagas Sanjaya

Stephen Rothwell reports htmldocs warning when merging iommu tree:

Documentation/driver-api/generic_pt.rst:32: WARNING: Literal block expected; none found. [docutils]

This is because of duplicate double colon code block markers: one after generic_pt/fmt/iommu_amdv1.c and the one in its preceding paragraph. The resulting htmldocs, however, only marks the include listing (after the former) up as it should be.

Drop the latter to fix the warning.

---
 Documentation/driver-api/generic_pt.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/driver-api/generic_pt.rst +1 -1
index 210d1229aa1c1f..7a9ca9f2878d4f 100644
@@ -27,7 +27,7 @@ compiled into a per-format IOMMU operations kernel module.
 For this to work the .c file for each compilation unit will include both the
 format headers and the generic code for the implementation. For instance in an
 implementation compilation unit the headers would normally be included as
-follows::
+follows:
 
 generic_pt/fmt/iommu_amdv1.c::
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#0 lore raw

v2 cover genpt documentation fixes

Hi,

Here are fixes for two htmldocs warnings in generic radix page table documentation. The first one is reported in linux-next [1], and the second one is also found when making htmldocs locally to reproduce the former.

Enjoy!

Changes since v1 [2]:

- s/to set/to read/ (Randy)

[1]: https://lore.kernel.org/linux-next/[email protected]/
[2]: https://lore.kernel.org/linux-doc/[email protected]/

Bagas Sanjaya (2):
Documentation: genpt: Don't use code block marker before iommu_amdv1.c
include listing
iommupt: Describe @bitnr parameter

 Documentation/driver-api/generic_pt.rst | 2 +-
 drivers/iommu/generic_pt/pt_common.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

base-commit: 75d9ef7cf1e694e5c0fb387be99f04acc7f864a4

Signature · 1 line
An old man doll... just what I always wanted! - Clara
maintainer Applied
#4 lore raw
Quoted 8 lines · Bagas Sanjaya

Bagas Sanjaya (2):
Documentation: genpt: Don't use code block marker before iommu_amdv1.c
include listing
iommupt: Describe @bitnr parameter

 Documentation/driver-api/generic_pt.rst | 2 +-
 drivers/iommu/generic_pt/pt_common.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

reviewer
#3 lore raw

Re: [PATCH v2 2/2] iommupt: Describe @bitnr parameter

In reply to Bagas Sanjaya

grumble...

Quoted 19 lines · Bagas Sanjaya

Sphinx reports kernel-doc warnings when making htmldocs:

WARNING: ./drivers/iommu/generic_pt/pt_common.h:361 function parameter 'bitnr' not described in 'pt_test_sw_bit_acquire'
WARNING: ./drivers/iommu/generic_pt/pt_common.h:371 function parameter 'bitnr' not described in 'pt_set_sw_bit_release'

Describe @bitnr to squash them.

Fixes bcc64b57b48e ("iommupt: Add basic support for SW bits in the page table")
---
 drivers/iommu/generic_pt/pt_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/iommu/generic_pt/pt_common.h +0 -0
index b5628f47e0db40..3b4e371089140a 100644

drivers/iommu/generic_pt/pt_common.h static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 356

Quoted 3 lines
drivers/iommu/generic_pt/pt_common.h +0 -0
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set

* @pts: Entry to read

drivers/iommu/generic_pt/pt_common.h static inline bool pt_test_sw_bit_acquire(struct pt_state *pts, · line 368

Quoted 9 lines
drivers/iommu/generic_pt/pt_common.h +2 -0
+ * @bitnr: Bit to read
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a test bit and acquire operation.
@@ -364,6 +365,7 @@ static inline bool pt_test_sw_bit_acquire(struct pt_state *pts,
 /**
  * pt_set_sw_bit_release() - Set a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to read

* @bitnr: Bit to set

Quoted 3 lines
drivers/iommu/generic_pt/pt_common.h +0 -0
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a set bit and release operation.
Signature · 1 line
~Randy
reviewer
#5 lore raw
In reply to Bagas Sanjaya
Quoted 7 lines · Bagas Sanjaya

Hi,

Here are fixes for two htmldocs warnings in generic radix page table documentation. The first one is reported in linux-next [1], and the second one is also found when making htmldocs locally to reproduce the former.

Quoted 5 lines

Enjoy!

Changes since v1 [2]:

- s/to set/to read/ (Randy)

That's not quite what I said (wrote):

Review static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 357

Quoted 5 lines
(quoted diff) +1 -0
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set

| Shouldn't both of these (above) to "to read" instead of "to set"?

No changes to pt_set_sw_bit_release() [which should say "to set" in 2 places].

Quoted 15 lines

[1]: https://lore.kernel.org/linux-next/[email protected]/
[2]: https://lore.kernel.org/linux-doc/[email protected]/

Bagas Sanjaya (2):
Documentation: genpt: Don't use code block marker before iommu_amdv1.c
include listing
iommupt: Describe @bitnr parameter

 Documentation/driver-api/generic_pt.rst | 2 +-
 drivers/iommu/generic_pt/pt_common.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

base-commit: 75d9ef7cf1e694e5c0fb387be99f04acc7f864a4

Signature · 1 line
~Randy
#6 lore raw
Quoted 19 lines · Randy Dunlap
Quoted 3 lines · Bagas Sanjaya

Changes since v1 [2]:

- s/to set/to read/ (Randy)

That's not quite what I said (wrote):

Review static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 357

Quoted 5 lines
(quoted diff) +1 -0
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set

| Shouldn't both of these (above) to "to read" instead of "to set"?

Quoted 2 lines

No changes to pt_set_sw_bit_release() [which should say "to set" in 2 places].

Oops, I misunderstood the review. Will send the fixup shortly.

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara