From patchwork Tue Aug 26 21:54:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 4784041 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8B06DC0338 for ; Tue, 26 Aug 2014 21:55:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A278A20123 for ; Tue, 26 Aug 2014 21:55:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBAB32010B for ; Tue, 26 Aug 2014 21:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755859AbaHZVzi (ORCPT ); Tue, 26 Aug 2014 17:55:38 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:44176 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755802AbaHZVzW (ORCPT ); Tue, 26 Aug 2014 17:55:22 -0400 Received: from [189.78.73.107] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMOi1-0007fK-Ot; Tue, 26 Aug 2014 21:55:21 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1XMOht-0002Bh-F3; Tue, 26 Aug 2014 18:55:13 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH v2 17/35] [media] omap_vout: Get rid of a few warnings Date: Tue, 26 Aug 2014 18:54:53 -0300 Message-Id: <1409090111-8290-18-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409090111-8290-1-git-send-email-m.chehab@samsung.com> References: <1409090111-8290-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/media/platform/omap/omap_vout.c: In function 'omapvid_setup_overlay': drivers/media/platform/omap/omap_vout.c:372:29: warning: variable 'pixheight' set but not used [-Wunused-but-set-variable] int cropheight, cropwidth, pixheight, pixwidth; ^ drivers/media/platform/omap/omap_vout.c: In function 'vidioc_s_ctrl': drivers/media/platform/omap/omap_vout.c:1454:24: warning: variable 'ovl' set but not used [-Wunused-but-set-variable] struct omap_overlay *ovl; ^ drivers/media/platform/omap/omap_vout.c: In function 'vidioc_reqbufs': drivers/media/platform/omap/omap_vout.c:1492:55: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) || (req->count < 0)) ^ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/omap/omap_vout.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 2d177fa58471..d9258f3d0f8e 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c @@ -369,7 +369,7 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout, { int ret = 0; struct omap_overlay_info info; - int cropheight, cropwidth, pixheight, pixwidth; + int cropheight, cropwidth, pixwidth; if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0 && (outw != vout->pix.width || outh != vout->pix.height)) { @@ -389,12 +389,10 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout, if (is_rotation_90_or_270(vout)) { cropheight = vout->crop.width; cropwidth = vout->crop.height; - pixheight = vout->pix.width; pixwidth = vout->pix.height; } else { cropheight = vout->crop.height; cropwidth = vout->crop.width; - pixheight = vout->pix.height; pixwidth = vout->pix.width; } @@ -1451,12 +1449,10 @@ static int vidioc_s_ctrl(struct file *file, void *fh, struct v4l2_control *a) } case V4L2_CID_VFLIP: { - struct omap_overlay *ovl; struct omapvideo_info *ovid; unsigned int mirror = a->value; ovid = &vout->vid_info; - ovl = ovid->overlays[0]; mutex_lock(&vout->lock); if (mirror && ovid->rotation_type == VOUT_ROT_NONE) { @@ -1489,7 +1485,7 @@ static int vidioc_reqbufs(struct file *file, void *fh, struct omap_vout_device *vout = fh; struct videobuf_queue *q = &vout->vbq; - if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) || (req->count < 0)) + if (req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) return -EINVAL; /* if memory is not mmp or userptr return error */