mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 21:04:40 +08:00
media: mtk-vcodec: mtk_vcodec_dec.c: fix comparison to bool
Fix the following coccinelle reports: drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:197:14-35: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:198:7-29: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:451:12-19: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:1159:6-15: WARNING: Comparison to bool By replacing (cond == true) with (cond) and (cond == false) with (!cond) Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
52cdded09b
commit
10e639041e
@ -194,8 +194,7 @@ static struct vb2_buffer *get_free_buffer(struct mtk_vcodec_ctx *ctx)
|
||||
vb->vb2_buf.index,
|
||||
dstbuf->queued_in_vb2);
|
||||
v4l2_m2m_buf_queue(ctx->m2m_ctx, vb);
|
||||
} else if ((dstbuf->queued_in_vb2 == false) &&
|
||||
(dstbuf->queued_in_v4l2 == true)) {
|
||||
} else if (!dstbuf->queued_in_vb2 && dstbuf->queued_in_v4l2) {
|
||||
/*
|
||||
* If buffer in v4l2 driver but not in vb2 queue yet,
|
||||
* and we get this buffer from free_list, it means
|
||||
@ -448,7 +447,7 @@ static void mtk_vdec_worker(struct work_struct *work)
|
||||
mutex_unlock(&ctx->lock);
|
||||
}
|
||||
v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_ERROR);
|
||||
} else if (res_chg == false) {
|
||||
} else if (!res_chg) {
|
||||
/*
|
||||
* we only return src buffer with VB2_BUF_STATE_DONE
|
||||
* when decode success without resolution change
|
||||
@ -1156,7 +1155,7 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb)
|
||||
buf = container_of(vb2_v4l2, struct mtk_video_dec_buf,
|
||||
m2m_buf.vb);
|
||||
mutex_lock(&ctx->lock);
|
||||
if (buf->used == false) {
|
||||
if (!buf->used) {
|
||||
v4l2_m2m_buf_queue(ctx->m2m_ctx, vb2_v4l2);
|
||||
buf->queued_in_vb2 = true;
|
||||
buf->queued_in_v4l2 = true;
|
||||
|
Loading…
Reference in New Issue
Block a user