* [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()
@ 2022-04-29 9:02 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-04-29 9:02 UTC (permalink / raw)
To: emma
Cc: mripard, airlied, daniel, dri-devel, linux-kernel, Minghao Chi,
Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/gpu/drm/vc4/vc4_bo.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index e451cc5bcfac..49c0f2ac868b 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -738,19 +738,13 @@ static const struct drm_gem_object_funcs vc4_gem_object_funcs = {
static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file)
{
- int ret;
-
if (!vc4->v3d)
return -ENODEV;
if (vc4file->bin_bo_used)
return 0;
- ret = vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
- if (ret)
- return ret;
-
- return 0;
+ return vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
}
int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()
@ 2022-04-29 9:02 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-04-29 9:02 UTC (permalink / raw)
To: emma; +Cc: airlied, Zeal Robot, linux-kernel, Minghao Chi, dri-devel
From: Minghao Chi <chi.minghao@zte.com.cn>
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/gpu/drm/vc4/vc4_bo.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index e451cc5bcfac..49c0f2ac868b 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -738,19 +738,13 @@ static const struct drm_gem_object_funcs vc4_gem_object_funcs = {
static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file)
{
- int ret;
-
if (!vc4->v3d)
return -ENODEV;
if (vc4file->bin_bo_used)
return 0;
- ret = vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
- if (ret)
- return ret;
-
- return 0;
+ return vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
}
int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: (subset) [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()
2022-04-29 9:02 ` cgel.zte
@ 2022-04-29 14:45 ` Maxime Ripard
-1 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2022-04-29 14:45 UTC (permalink / raw)
To: emma, cgel.zte
Cc: Maxime Ripard, mripard, linux-kernel, Minghao Chi, airlied,
dri-devel, Zeal Robot, daniel
On Fri, 29 Apr 2022 09:02:08 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
>
Applied to drm/drm-misc (drm-misc-next).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: (subset) [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()
@ 2022-04-29 14:45 ` Maxime Ripard
0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2022-04-29 14:45 UTC (permalink / raw)
To: emma, cgel.zte
Cc: airlied, Zeal Robot, linux-kernel, Minghao Chi, dri-devel, Maxime Ripard
On Fri, 29 Apr 2022 09:02:08 +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
>
Applied to drm/drm-misc (drm-misc-next).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-29 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 9:02 [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo() cgel.zte
2022-04-29 9:02 ` cgel.zte
2022-04-29 14:45 ` (subset) " Maxime Ripard
2022-04-29 14:45 ` Maxime Ripard
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.