drm/gem-dma: Correct GEM object wrapper documentation
Subsystems (2)
PATCH 1/1 drm/gem-dma: Correct GEM object wrapper documentation
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.
--- include/drm/drm_gem_dma_helper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/drm/drm_gem_dma_helper.h +3 -2
@@ -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) {
Signature · 1 line
2.39.5 (Apple Git-154)
Quoted 4 lines · Karl Mehltretter
The
drm_gem_dma_object_free()wrapper callsdrm_gem_dma_free(), but its description still names the formerdrm_gem_dma_free_object()helper. Update the reference to match the wrapped function.
Quoted 8 lines
Also correct
drm_gem_dma_object_get_sg_table()to document an error pointer on failure. It forwards the result ofdrm_gem_dma_get_sg_table(), which returnsERR_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.
Quoted 28 lines
Signed-off-by Karl Mehltretter <[email protected]>--- include/drm/drm_gem_dma_helper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)include/drm/drm_gem_dma_helper.h +3
-2@@ -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) {
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 8 lines · Laurent Pinchart
Quoted 3 lines
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 LLMThrowing 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