From patchwork Wed Aug 1 21:50:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10553069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC11A15E2 for ; Wed, 1 Aug 2018 21:50:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B51C2B13B for ; Wed, 1 Aug 2018 21:50:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F27F2B71F; Wed, 1 Aug 2018 21:50:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39D8E2B13B for ; Wed, 1 Aug 2018 21:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732524AbeHAXib (ORCPT ); Wed, 1 Aug 2018 19:38:31 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43314 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbeHAXib (ORCPT ); Wed, 1 Aug 2018 19:38:31 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id CFA1F27E1A0 From: Ezequiel Garcia To: linux-media@vger.kernel.org Cc: Hans Verkuil , kernel@collabora.com, paul.kocialkowski@bootlin.com, maxime.ripard@bootlin.com, Hans Verkuil , Shuah Khan , linux-kselftest@vger.kernel.org, Ezequiel Garcia Subject: [PATCH v3 1/4] v4l2-mem2mem: Avoid v4l2_m2m_prepare_buf from scheduling a job Date: Wed, 1 Aug 2018 18:50:23 -0300 Message-Id: <20180801215026.27809-2-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801215026.27809-1-ezequiel@collabora.com> References: <20180801215026.27809-1-ezequiel@collabora.com> Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need for v4l2_m2m_prepare_buf to try to schedule a job, as it only prepares a buffer, but does not queue or changes the state of the queue. Remove the call to v4l2_m2m_try_schedule from v4l2_m2m_prepare_buf. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 0a93c5b173c2..efae845435c9 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -481,14 +481,9 @@ int v4l2_m2m_prepare_buf(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, struct v4l2_buffer *buf) { struct vb2_queue *vq; - int ret; vq = v4l2_m2m_get_vq(m2m_ctx, buf->type); - ret = vb2_prepare_buf(vq, buf); - if (!ret) - v4l2_m2m_try_schedule(m2m_ctx); - - return ret; + return vb2_prepare_buf(vq, buf); } EXPORT_SYMBOL_GPL(v4l2_m2m_prepare_buf);