* [PATCH] drm: correct comments
@ 2022-07-15 9:22 Liu Zixian
2022-07-15 9:51 ` Maxime Ripard
0 siblings, 1 reply; 3+ messages in thread
From: Liu Zixian @ 2022-07-15 9:22 UTC (permalink / raw)
To: maarten.lankhorst, mripard, tzimmermann, airlied, daniel, dri-devel
Cc: linfeilong
On failure, these functions return errno, not NULL.
Signed-off-by: Liu Zixian <liuzixian4@huawei.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
include/drm/drm_gem_shmem_helper.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 8ad0e0299..37009418c 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -662,7 +662,7 @@ EXPORT_SYMBOL(drm_gem_shmem_print_info);
* drm_gem_shmem_get_pages_sgt() instead.
*
* 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 or errno on failure.
*/
struct sg_table *drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object *shmem)
{
diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
index d0a57853c..0122e4075 100644
--- a/include/drm/drm_gem_shmem_helper.h
+++ b/include/drm/drm_gem_shmem_helper.h
@@ -210,7 +210,7 @@ static inline void drm_gem_shmem_object_unpin(struct drm_gem_object *obj)
* 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 or errno on failure.
*/
static inline struct sg_table *drm_gem_shmem_object_get_sg_table(struct drm_gem_object *obj)
{
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: correct comments
2022-07-15 9:22 [PATCH] drm: correct comments Liu Zixian
@ 2022-07-15 9:51 ` Maxime Ripard
0 siblings, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2022-07-15 9:51 UTC (permalink / raw)
To: Liu Zixian; +Cc: tzimmermann, airlied, dri-devel, linfeilong
Hi,
On Fri, Jul 15, 2022 at 05:22:56PM +0800, Liu Zixian wrote:
> On failure, these functions return errno, not NULL.
They don't return an errno but an error pointer
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] drm: correct comments
@ 2022-07-18 1:53 Liu Zixian
0 siblings, 0 replies; 3+ messages in thread
From: Liu Zixian @ 2022-07-18 1:53 UTC (permalink / raw)
To: maxime, maarten.lankhorst, mripard, tzimmermann, airlied, daniel,
dri-devel
Cc: linfeilong
On failure, these functions return error pointer, not NULL.
Signed-off-by: Liu Zixian <liuzixian4@huawei.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
include/drm/drm_gem_shmem_helper.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 8ad0e0299..05ca028dd 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -662,7 +662,7 @@ EXPORT_SYMBOL(drm_gem_shmem_print_info);
* drm_gem_shmem_get_pages_sgt() instead.
*
* 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 or error pointer on failure.
*/
struct sg_table *drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object *shmem)
{
diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
index d0a57853c..a2201b248 100644
--- a/include/drm/drm_gem_shmem_helper.h
+++ b/include/drm/drm_gem_shmem_helper.h
@@ -210,7 +210,7 @@ static inline void drm_gem_shmem_object_unpin(struct drm_gem_object *obj)
* 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 or error pointer on failure.
*/
static inline struct sg_table *drm_gem_shmem_object_get_sg_table(struct drm_gem_object *obj)
{
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-18 8:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 9:22 [PATCH] drm: correct comments Liu Zixian
2022-07-15 9:51 ` Maxime Ripard
2022-07-18 1:53 Liu Zixian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.