mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/gem-dma: Correct GEM object wrapper documentation
@ 2026-09-12  6:32 Karl Mehltretter
  2026-09-12 16:25 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Mehltretter @ 2026-09-12  6:32 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter
  Cc: Karl Mehltretter, Sam Ravnborg, Laurent Pinchart,
	Danilo Krummrich, Liviu Dudau, dri-devel, linux-kernel

The drm_gem_dma_object_free() wrapper calls drm_gem_dma_free(), but its
description still names the former drm_gem_dma_free_object() helper.
Update the reference to match the wrapped function.

Also correct drm_gem_dma_object_get_sg_table() to document an error
pointer on failure. It forwards the result of
drm_gem_dma_get_sg_table(), which returns ERR_PTR() rather than NULL on
failure.

Fixes: e580ea25c08d ("drm/cma-helper: Pass GEM CMA object in public interfaces")
Fixes: 05b1de51df07 ("drm/cma-helper: Export dedicated wrappers for GEM object functions")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 include/drm/drm_gem_dma_helper.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/drm/drm_gem_dma_helper.h b/include/drm/drm_gem_dma_helper.h
index f2678e7ecb9847917e9c6c0287af9815d54bae79..5defd47d7de425515c76391d1825f0ed28077eaa 100644
--- a/include/drm/drm_gem_dma_helper.h
+++ b/include/drm/drm_gem_dma_helper.h
@@ -52,7 +52,7 @@ extern const struct vm_operations_struct drm_gem_dma_vm_ops;
  * drm_gem_dma_object_free - GEM object function for drm_gem_dma_free()
  * @obj: GEM object to free
  *
- * This function wraps drm_gem_dma_free_object(). Drivers that employ the DMA helpers
+ * This function wraps drm_gem_dma_free(). Drivers that employ the DMA helpers
  * should use it as their &drm_gem_object_funcs.free handler.
  */
 static inline void drm_gem_dma_object_free(struct drm_gem_object *obj)
@@ -87,7 +87,8 @@ static inline void drm_gem_dma_object_print_info(struct drm_printer *p, unsigned
  * use it as their &drm_gem_object_funcs.get_sg_table handler.
  *
  * Returns:
- * A pointer to the scatter/gather table of pinned pages or NULL on failure.
+ * A pointer to the scatter/gather table of pinned pages on success, or
+ * an ERR_PTR() on failure.
  */
 static inline struct sg_table *drm_gem_dma_object_get_sg_table(struct drm_gem_object *obj)
 {
-- 
2.39.5 (Apple Git-154)


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

* Re: [PATCH] drm/gem-dma: Correct GEM object wrapper documentation
  2026-09-12  6:32 [PATCH] drm/gem-dma: Correct GEM object wrapper documentation Karl Mehltretter
@ 2026-09-12 16:25 ` Laurent Pinchart
  2026-09-12 16:35   ` Karl Mehltretter
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2026-09-12 16:25 UTC (permalink / raw)
  To: Karl Mehltretter
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Sam Ravnborg, Danilo Krummrich,
	Liviu Dudau, dri-devel, linux-kernel

On Sat, Sep 12, 2026 at 08:32:58AM +0200, Karl Mehltretter wrote:
> The drm_gem_dma_object_free() wrapper calls drm_gem_dma_free(), but its
> description still names the former drm_gem_dma_free_object() helper.
> Update the reference to match the wrapped function.
> 
> Also correct drm_gem_dma_object_get_sg_table() to document an error
> pointer on failure. It forwards the result of
> drm_gem_dma_get_sg_table(), which returns ERR_PTR() rather than NULL on
> failure.
> 
> Fixes: e580ea25c08d ("drm/cma-helper: Pass GEM CMA object in public interfaces")
> Fixes: 05b1de51df07 ("drm/cma-helper: Export dedicated wrappers for GEM object functions")
> Assisted-by: LLM

Throwing LLMs at this kind of things is neither a good use of computing
resources nor a good use of maintainer time. Please refrain from doing
so in the future.

> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
>  include/drm/drm_gem_dma_helper.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_gem_dma_helper.h b/include/drm/drm_gem_dma_helper.h
> index f2678e7ecb9847917e9c6c0287af9815d54bae79..5defd47d7de425515c76391d1825f0ed28077eaa 100644
> --- a/include/drm/drm_gem_dma_helper.h
> +++ b/include/drm/drm_gem_dma_helper.h
> @@ -52,7 +52,7 @@ extern const struct vm_operations_struct drm_gem_dma_vm_ops;
>   * drm_gem_dma_object_free - GEM object function for drm_gem_dma_free()
>   * @obj: GEM object to free
>   *
> - * This function wraps drm_gem_dma_free_object(). Drivers that employ the DMA helpers
> + * This function wraps drm_gem_dma_free(). Drivers that employ the DMA helpers
>   * should use it as their &drm_gem_object_funcs.free handler.
>   */
>  static inline void drm_gem_dma_object_free(struct drm_gem_object *obj)
> @@ -87,7 +87,8 @@ static inline void drm_gem_dma_object_print_info(struct drm_printer *p, unsigned
>   * use it as their &drm_gem_object_funcs.get_sg_table handler.
>   *
>   * Returns:
> - * A pointer to the scatter/gather table of pinned pages or NULL on failure.
> + * A pointer to the scatter/gather table of pinned pages on success, or
> + * an ERR_PTR() on failure.
>   */
>  static inline struct sg_table *drm_gem_dma_object_get_sg_table(struct drm_gem_object *obj)
>  {

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH] drm/gem-dma: Correct GEM object wrapper documentation
  2026-09-12 16:25 ` Laurent Pinchart
@ 2026-09-12 16:35   ` Karl Mehltretter
  0 siblings, 0 replies; 3+ messages in thread
From: Karl Mehltretter @ 2026-09-12 16:35 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Sam Ravnborg, Danilo Krummrich,
	Liviu Dudau, dri-devel, linux-kernel

On Sat, Sep 12, 2026 at 07:25:16PM +0100, Laurent Pinchart wrote:
> > Fixes: e580ea25c08d ("drm/cma-helper: Pass GEM CMA object in public interfaces")
> > Fixes: 05b1de51df07 ("drm/cma-helper: Export dedicated wrappers for GEM object functions")
> > Assisted-by: LLM
> 
> Throwing LLMs at this kind of things is neither a good use of computing
> resources nor a good use of maintainer time. Please refrain from doing
> so in the future.
> 

I view it differently but respect your wish for drm.

Thanks,
Karl

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

end of thread, other threads:[~2026-09-12 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12  6:32 [PATCH] drm/gem-dma: Correct GEM object wrapper documentation Karl Mehltretter
2026-09-12 16:25 ` Laurent Pinchart
2026-09-12 16:35   ` Karl Mehltretter

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

all inboxes | Powered by JetHome®