From: cgel.zte@gmail.com To: emma@anholt.net Cc: mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Minghao Chi <chi.minghao@zte.com.cn>, Zeal Robot <zealci@zte.com.cn> Subject: [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo() Date: Fri, 29 Apr 2022 09:02:08 +0000 [thread overview] Message-ID: <20220429090208.3852879-1-chi.minghao@zte.com.cn> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: cgel.zte@gmail.com To: emma@anholt.net Cc: airlied@linux.ie, Zeal Robot <zealci@zte.com.cn>, linux-kernel@vger.kernel.org, Minghao Chi <chi.minghao@zte.com.cn>, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo() Date: Fri, 29 Apr 2022 09:02:08 +0000 [thread overview] Message-ID: <20220429090208.3852879-1-chi.minghao@zte.com.cn> (raw) 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
next reply other threads:[~2022-04-29 9:02 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-29 9:02 cgel.zte [this message] 2022-04-29 9:02 ` [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo() cgel.zte 2022-04-29 14:45 ` (subset) " Maxime Ripard 2022-04-29 14:45 ` Maxime Ripard
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220429090208.3852879-1-chi.minghao@zte.com.cn \ --to=cgel.zte@gmail.com \ --cc=airlied@linux.ie \ --cc=chi.minghao@zte.com.cn \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=emma@anholt.net \ --cc=linux-kernel@vger.kernel.org \ --cc=mripard@kernel.org \ --cc=zealci@zte.com.cn \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.