From patchwork Wed Feb 25 15:58:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 28404 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1YQeME-0006kY-5w; Wed, 25 Feb 2015 16:58:42 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-6) with esmtp id 1YQeMB-0000OP-5z; Wed, 25 Feb 2015 16:58:41 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752576AbbBYP6d (ORCPT + 1 other); Wed, 25 Feb 2015 10:58:33 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:40609 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752450AbbBYP6c (ORCPT ); Wed, 25 Feb 2015 10:58:32 -0500 Received: by wghl18 with SMTP id l18so4538841wgh.7 for ; Wed, 25 Feb 2015 07:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3ImhisMhLtScmltxFdPwgiTR/+u3ebCRGcQRFcaW9ck=; b=oKFBDdHuPR/QAJ2SSJfXRyLb0vzHpsAlLZ8r/uzMdnVfgH1+AZSUbaobA86Ug7Uazd QjH8mk4XRZk/ZkjrfbsXJ0FW5awWjv3Wllx5Vy2uME9g9+9Pwkq33TU53gfBsPQeZVWl TJXM8shZNh0tYJTniOXfQ4cu5KYS0tjxcjlaVkumur3xRi8IA0+CwKPm+guyEUnMwvhd EHIdAvm08D9f68uLPaWMdwH8Jk/J/GvlIJuZr088uTV95OD+5DZ757t8banvGCY2gq9x mKaMm0//xwaxz+P8f923o+oF+ir8tEh0DnHJGa7ICchgtb6QWX+BN/NFXCTdP5F850jw H3mQ== X-Received: by 10.194.239.65 with SMTP id vq1mr7359399wjc.98.1424879911522; Wed, 25 Feb 2015 07:58:31 -0800 (PST) Received: from tango-charlie.RL.local ([194.72.83.162]) by mx.google.com with ESMTPSA id d10sm65417688wjn.45.2015.02.25.07.58.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 07:58:30 -0800 (PST) From: Lad Prabhakar To: Laurent Pinchart , linux-media@vger.kernel.org Cc: "Lad, Prabhakar" Subject: [PATCH] media: omap3isp: use vb2_buffer_state enum for vb2 buffer state Date: Wed, 25 Feb 2015 15:58:14 +0000 Message-Id: <1424879894-7128-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.2.25.154821 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGED_FROM_GMAIL 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' From: "Lad, Prabhakar" use the vb2_buffer_state enum for assigning the state of the vb2 buffer, along side making isp_pipeline_state state variable local to the block. This fixes the following sparse warning as well: drivers/media/platform/omap3isp/ispvideo.c:497:35: warning: mixing different enum types drivers/media/platform/omap3isp/ispvideo.c:497:35: int enum isp_pipeline_state versus drivers/media/platform/omap3isp/ispvideo.c:497:35: int enum vb2_buffer_state Signed-off-by: Lad, Prabhakar Reviewed-by: Laurent Pinchart --- drivers/media/platform/omap3isp/ispvideo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 3fe9047..8cd3a57 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -449,7 +449,7 @@ static const struct vb2_ops isp_video_queue_ops = { struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video) { struct isp_pipeline *pipe = to_isp_pipeline(&video->video.entity); - enum isp_pipeline_state state; + enum vb2_buffer_state vb_state; struct isp_buffer *buf; unsigned long flags; struct timespec ts; @@ -488,17 +488,19 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video) /* Report pipeline errors to userspace on the capture device side. */ if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->error) { - state = VB2_BUF_STATE_ERROR; + vb_state = VB2_BUF_STATE_ERROR; pipe->error = false; } else { - state = VB2_BUF_STATE_DONE; + vb_state = VB2_BUF_STATE_DONE; } - vb2_buffer_done(&buf->vb, state); + vb2_buffer_done(&buf->vb, vb_state); spin_lock_irqsave(&video->irqlock, flags); if (list_empty(&video->dmaqueue)) { + enum isp_pipeline_state state; + spin_unlock_irqrestore(&video->irqlock, flags); if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)