The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Document the get, put, mmap and munmap operations
@ 2026-11-25 17:20 TAKANO Mitsuhiro
  2026-11-26  6:48 ` Mikko Perttunen
  0 siblings, 1 reply; 2+ messages in thread
From: TAKANO Mitsuhiro @ 2026-11-25 17:20 UTC (permalink / raw)
  To: Thierry Reding, Mikko Perttunen
  Cc: dri-devel, linux-tegra, linux-kernel, TAKANO Mitsuhiro

struct host1x_bo_ops documents its pin and unpin operations but not the
four that take a reference on a bo and map it into the kernel address
space, so kernel-doc reports each of them as undescribed:

  include/linux/host1x.h:159 struct member 'get' not described in 'host1x_bo_ops'
  include/linux/host1x.h:159 struct member 'put' not described in 'host1x_bo_ops'
  include/linux/host1x.h:159 struct member 'mmap' not described in 'host1x_bo_ops'
  include/linux/host1x.h:159 struct member 'munmap' not described in 'host1x_bo_ops'

Describe them from what the implementations do: get takes a reference and
returns the bo, put drops the reference, mmap maps the bo into the kernel
address space and returns the address, munmap unmaps the address that mmap
returned.

kernel-doc on the file prints eight warnings before the change and none
after it.

Written with Hermes Agent, an LLM assistant; the author reviewed it and ran
kernel-doc on the file with and without the change.

Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
 include/linux/host1x.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index e7ba601b2afb..411a1c84eb61 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -146,8 +146,12 @@ static inline struct host1x_bo_mapping *to_host1x_bo_mapping(struct kref *ref)
 /**
  * struct host1x_bo_ops - operations implemented by a host1x_bo provider
  *
+ * @get: take a reference on the bo and return it.
+ * @put: drop a reference on the bo.
  * @pin: create a DMA mapping. Implementation must not touch the bo's refcount.
  * @unpin: destroy a DMA mapping. Implementation must not touch the bo's refcount.
+ * @mmap: map the bo into the kernel address space and return the address.
+ * @munmap: unmap the address @mmap returned.
  */
 struct host1x_bo_ops {
 	struct host1x_bo *(*get)(struct host1x_bo *bo);

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
-- 
2.53.0


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

* Re: [PATCH] gpu: host1x: Document the get, put, mmap and munmap operations
  2026-11-25 17:20 [PATCH] gpu: host1x: Document the get, put, mmap and munmap operations TAKANO Mitsuhiro
@ 2026-11-26  6:48 ` Mikko Perttunen
  0 siblings, 0 replies; 2+ messages in thread
From: Mikko Perttunen @ 2026-11-26  6:48 UTC (permalink / raw)
  To: Thierry Reding, linux-tegra
  Cc: dri-devel, linux-tegra, linux-kernel, TAKANO Mitsuhiro,
	TAKANO Mitsuhiro

On Thursday, November 26, 2026 2:20 AM TAKANO Mitsuhiro wrote:
> struct host1x_bo_ops documents its pin and unpin operations but not the
> four that take a reference on a bo and map it into the kernel address
> space, so kernel-doc reports each of them as undescribed:
> 
>   include/linux/host1x.h:159 struct member 'get' not described in 'host1x_bo_ops'
>   include/linux/host1x.h:159 struct member 'put' not described in 'host1x_bo_ops'
>   include/linux/host1x.h:159 struct member 'mmap' not described in 'host1x_bo_ops'
>   include/linux/host1x.h:159 struct member 'munmap' not described in 'host1x_bo_ops'
> 
> Describe them from what the implementations do: get takes a reference and
> returns the bo, put drops the reference, mmap maps the bo into the kernel
> address space and returns the address, munmap unmaps the address that mmap
> returned.
> 
> kernel-doc on the file prints eight warnings before the change and none
> after it.
> 
> Written with Hermes Agent, an LLM assistant; the author reviewed it and ran
> kernel-doc on the file with and without the change.
> 
> Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
> ---
>  include/linux/host1x.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/host1x.h b/include/linux/host1x.h
> index e7ba601b2afb..411a1c84eb61 100644
> --- a/include/linux/host1x.h
> +++ b/include/linux/host1x.h
> @@ -146,8 +146,12 @@ static inline struct host1x_bo_mapping *to_host1x_bo_mapping(struct kref *ref)
>  /**
>   * struct host1x_bo_ops - operations implemented by a host1x_bo provider
>   *
> + * @get: take a reference on the bo and return it.
> + * @put: drop a reference on the bo.
>   * @pin: create a DMA mapping. Implementation must not touch the bo's refcount.
>   * @unpin: destroy a DMA mapping. Implementation must not touch the bo's refcount.
> + * @mmap: map the bo into the kernel address space and return the address.
> + * @munmap: unmap the address @mmap returned.
>   */
>  struct host1x_bo_ops {
>  	struct host1x_bo *(*get)(struct host1x_bo *bo);
> 
> base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
> -- 
> 2.53.0
> 
> 

Equivalent patch was already sent to the list.

Mikko




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

end of thread, other threads:[~2026-11-26  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 17:20 [PATCH] gpu: host1x: Document the get, put, mmap and munmap operations TAKANO Mitsuhiro
2026-11-26  6:48 ` Mikko Perttunen

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