Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1714615
| From | Hans Verkuil <hverkuil@xs4all.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] media: venus: fix duplicated code for different branches |
| Date | 2017-08-18 09:00 +0200 |
| Message-ID | <ufJqa-896-3@gated-at.bofh.it> (permalink) |
| References | <ufCf0-3iO-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Stanimir, please review this! I suspect that this is the wrong fix and
that the first v4l2_m2m_src_buf_remove_by_buf should be
v4l2_m2m_dst_buf_remove_by_buf instead.
Regards,
Hans
On 08/18/2017 01:12 AM, Gustavo A. R. Silva wrote:
> Refactor code in order to avoid identical code for different branches.
>
> This issue was detected with the help of Coccinelle.
>
> Addresses-Coverity-ID: 1415317
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This code was reported by Coverity and it was tested by compilation only.
> Please, verify if this is an actual bug.
>
> drivers/media/platform/qcom/venus/helpers.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 5f4434c..8a5c467 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -240,11 +240,7 @@ static void return_buf_error(struct venus_inst *inst,
> {
> struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx;
>
> - if (vbuf->vb2_buf.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
> - v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
> - else
> - v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
> -
> + v4l2_m2m_src_buf_remove_by_buf(m2m_ctx, vbuf);
> v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
> }
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] media: venus: fix duplicated code for different branches "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-18 01:20 +0200
Re: [PATCH] media: venus: fix duplicated code for different branches Hans Verkuil <hverkuil@xs4all.nl> - 2017-08-18 09:00 +0200
Re: [PATCH] media: venus: fix duplicated code for different branches Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-18 10:00 +0200
Re: [PATCH] media: venus: fix duplicated code for different branches "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-18 18:00 +0200
[PATCH v2] venus: fix copy/paste error in return_buf_error "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-18 18:10 +0200
Re: [PATCH v2] venus: fix copy/paste error in return_buf_error Stanimir Varbanov <svarbanov@mm-sol.com> - 2017-08-21 11:20 +0200
Re: [PATCH v2] venus: fix copy/paste error in return_buf_error "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-22 21:30 +0200
Re: [PATCH v2] venus: fix copy/paste error in return_buf_error Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-23 15:00 +0200
Re: [PATCH v2] venus: fix copy/paste error in return_buf_error Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-23 17:20 +0200
csiph-web