include/drm/drm_gem_dma_helper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
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)
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
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
© 2016 - 2026 Red Hat, Inc.