* [PATCH -next] media: venus: simplify the return expression of session_process_buf()
@ 2020-09-21 13:10 Qinglang Miao
2020-09-25 15:13 ` Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
To: Stanimir Varbanov, Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab
Cc: linux-media, linux-arm-msm, linux-kernel, Qinglang Miao
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/media/platform/qcom/venus/helpers.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 50439eb1f..fb3fd3640 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -439,7 +439,6 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf)
struct vb2_buffer *vb = &vbuf->vb2_buf;
unsigned int type = vb->type;
struct hfi_frame_data fdata;
- int ret;
memset(&fdata, 0, sizeof(fdata));
fdata.alloc_len = buf->size;
@@ -470,11 +469,7 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf)
fdata.offset = 0;
}
- ret = hfi_session_process_buf(inst, &fdata);
- if (ret)
- return ret;
-
- return 0;
+ return hfi_session_process_buf(inst, &fdata);
}
static bool is_dynamic_bufmode(struct venus_inst *inst)
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] media: venus: simplify the return expression of session_process_buf()
2020-09-21 13:10 [PATCH -next] media: venus: simplify the return expression of session_process_buf() Qinglang Miao
@ 2020-09-25 15:13 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2020-09-25 15:13 UTC (permalink / raw)
To: Qinglang Miao
Cc: Stanimir Varbanov, Andy Gross, Mauro Carvalho Chehab,
linux-media, linux-arm-msm, linux-kernel
On Mon 21 Sep 08:10 CDT 2020, Qinglang Miao wrote:
> Simplify the return expression.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> drivers/media/platform/qcom/venus/helpers.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 50439eb1f..fb3fd3640 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -439,7 +439,6 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf)
> struct vb2_buffer *vb = &vbuf->vb2_buf;
> unsigned int type = vb->type;
> struct hfi_frame_data fdata;
> - int ret;
>
> memset(&fdata, 0, sizeof(fdata));
> fdata.alloc_len = buf->size;
> @@ -470,11 +469,7 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf)
> fdata.offset = 0;
> }
>
> - ret = hfi_session_process_buf(inst, &fdata);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return hfi_session_process_buf(inst, &fdata);
> }
>
> static bool is_dynamic_bufmode(struct venus_inst *inst)
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-25 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] media: venus: simplify the return expression of session_process_buf() Qinglang Miao
2020-09-25 15:13 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).