From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580AbdC0KLS (ORCPT ); Mon, 27 Mar 2017 06:11:18 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:60589 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbdC0KLF (ORCPT ); Mon, 27 Mar 2017 06:11:05 -0400 Message-ID: <1490609415.2409.5.camel@pengutronix.de> Subject: Re: [PATCH] [media] coda: remove redundant call to v4l2_m2m_get_vq From: Philipp Zabel To: Hans Verkuil Cc: Colin King , Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 27 Mar 2017 12:10:15 +0200 In-Reply-To: <45a3ba2e-634c-156b-71b4-75aa8d89827b@xs4all.nl> References: <20170323115746.18474-1-colin.king@canonical.com> <45a3ba2e-634c-156b-71b4-75aa8d89827b@xs4all.nl> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-03-27 at 11:46 +0200, Hans Verkuil wrote: > On 23/03/17 12:57, Colin King wrote: > > From: Colin Ian King > > > > The call to v4ls_m2m_get_vq is only used to get the return value > > which is not being used, so it appears to be redundant and can > > be removed. > > > > Detected with CoverityScan, CID#1420674 ("Useless call") > > > > Signed-off-by: Colin Ian King > > --- > > drivers/media/platform/coda/coda-common.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c > > index 800d2477f1a0..95e4648f18e6 100644 > > --- a/drivers/media/platform/coda/coda-common.c > > +++ b/drivers/media/platform/coda/coda-common.c > > @@ -817,8 +817,6 @@ static int coda_qbuf(struct file *file, void *priv, > > static bool coda_buf_is_end_of_stream(struct coda_ctx *ctx, > > struct vb2_v4l2_buffer *buf) > > { > > - v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); > > - > > return ((ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG) && > > (buf->sequence == (ctx->qsequence - 1))); > > } > > > > Philipp, is this correct, or should this actually check whether the queue is an > output queue? Yes, this was previously assigned to an unused local variable src_vq, since initial commit 918c66fd4126 ("[media] coda: add CODA7541 decoding support"). coda_buf_is_end_of_stream is called from coda_m2m_buf_done, which is exclusively used on destination buffers on the capture queue. Acked-by: Philipp Zabel regards Philipp