From patchwork Sat Dec 19 15:23:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 7890491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 04C439F1AF for ; Sat, 19 Dec 2015 15:25:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 409D2204D2 for ; Sat, 19 Dec 2015 15:25:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 717C7204CF for ; Sat, 19 Dec 2015 15:25:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aAJMc-00077P-Ey; Sat, 19 Dec 2015 15:24:06 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aAJMZ-0006yX-Vx for linux-arm-kernel@lists.infradead.org; Sat, 19 Dec 2015 15:24:04 +0000 Received: from [192.168.1.3] ([78.53.50.164]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MWAtV-1ZhKL13naL-00XMPE; Sat, 19 Dec 2015 16:23:19 +0100 To: Krzysztof Kozlowski , Kukjin Kim , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] gsc-m2m: Use an unsigned data type for a variable Message-ID: <5675765F.9020002@users.sourceforge.net> Date: Sat, 19 Dec 2015 16:23:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:3t54QODG6TS8WHVpxVA1P1wD7e39TfTUPZlaTWJb3zImbg07kp3 V2OMfCT28D0iy7I+Gv4vxdiy3gK+WgrV16gqIMoZcvmAwT+WMe7W8mHepjAn0jLT5ZB7SpS XLSS3yozFi9pgj2J6ui19/lQpSr5cFpXQ70hZq1tseymK4hfgaFKLHHvewzPwiKUvtc1cP/ JLyjDVZA0zXjbjAW/tbsg== X-UI-Out-Filterresults: notjunk:1; V01:K0:bC52GRcRLvE=:doqrSHxJ0bQrcdftz4bwS5 NCIJ+GX5frl3lg5OWKhSqbKFNMNIvEp7CyEGYbc/Jt7QamCTevOE2bCIl/w8YgYJLWXfYt6rD Gfcbd5+Lq4G2xiyF1TY2eRPilYLw6KUtAEZoSpsrgeGLFVnP6zi6H+yc1HmNIK3wywdaZLY1p APKdHrfxSRkiu4euBTzwoxirFQEk2/DfwxpNRhgkAuxenWFAxWfyfaPVoL7WkR9DRE0Lkrz2L 1az0gpKOh0lGGmfE73E6aWz/iKFz1DTMDQHJsQ3PSScI2mqGurlPt1mHofFppG6Kro7jDc8Ax whbBOWE7R1MBP0VpsMMSkL2r2uNRanCdCcERU3mSiRIONbiQmmqFuXsvqhHBPk9rvDFpwjxHf yeF+NWmhsBCyqiS3VX9flHfCs+1OuvSitRhVXipJ4F5LvezvzCCcv4+CLGVcesBq1i5ipdoQ8 uo8rRBpmWXkwU7SSWAF9qx0hsdpDx881mC6w6TIjdP7KC16DNP93kplwQh+bsX6AnGtnp8fLF Arh0Aq6La02X3FrubVq83SrhXboI/iQxzut+N1Znh2KIkf9IcYSaayS8yDKlM2w3v1Qs59rja CslaCzm5ABUN8Ig01PTDiK7jA0c7go6PSf5G25zRS6IFZV6jjiSyUh1pHs3qRCBuzyfmJc2gV +jJfRb45SlCsPaPKnFDm1O/xYOaJ5MDTyOufQejRdGADvo/aJjVb9tbOXJmhopxYKPgGpt7qf pGu0WF1BMEq+aCNflZwZutFUhPeWIuD58EYhma97tSmhBUeeqaFSaW3ol2Punj7Mw0esfs9bL 3UYmVFy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151219_072404_421164_2EFC0483 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Markus Elfring Date: Sat, 19 Dec 2015 15:28:37 +0100 The data type "int" was used by the variable "ret" in the gsc_m2m_poll() function despite of the aspect that the type "unsigned int" will usually be needed for the return value from a call of the v4l2_m2m_poll() function. Improve this implementation detail by addition of the type modifier then. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c index d82e717..f2c091c 100644 --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c @@ -701,7 +701,7 @@ static unsigned int gsc_m2m_poll(struct file *file, { struct gsc_ctx *ctx = fh_to_ctx(file->private_data); struct gsc_dev *gsc = ctx->gsc_dev; - int ret; + unsigned int ret; if (mutex_lock_interruptible(&gsc->lock)) return -ERESTARTSYS;