From patchwork Thu Feb 21 11:54:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 2171281 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 293D4DF215 for ; Thu, 21 Feb 2013 11:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753202Ab3BULx2 (ORCPT ); Thu, 21 Feb 2013 06:53:28 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:18864 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087Ab3BULx1 (ORCPT ); Thu, 21 Feb 2013 06:53:27 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MIK002FUJP1A1O0@mailout4.samsung.com> for linux-media@vger.kernel.org; Thu, 21 Feb 2013 20:53:25 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 2F.74.06456.5BA06215; Thu, 21 Feb 2013 20:53:25 +0900 (KST) X-AuditID: cbfee68e-b7fc26d000001938-54-51260ab55ce1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 61.43.03918.5BA06215; Thu, 21 Feb 2013 20:53:25 +0900 (KST) Received: from shaik-linux.sisodomain.com ([107.108.207.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MIK00DQ4JNSPK40@mmp2.samsung.com> for linux-media@vger.kernel.org; Thu, 21 Feb 2013 20:53:25 +0900 (KST) From: Shaik Ameer Basha To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com Subject: [PATCH] [media] fimc-lite: Fix the variable type to avoid possible crash Date: Thu, 21 Feb 2013 17:24:17 +0530 Message-id: <1361447658-20793-1-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJLMWRmVeSWpSXmKPExsWyRsSkTncrl1qgQcNEE4ueDVtZHRg9Pm+S C2CM4rJJSc3JLEst0rdL4Mp4sms/S8FLzorJW1ayNzAu4ehi5OSQEDCRuHTqChOELSZx4d56 NhBbSGApo8SXf8kwNZv7ZgLFuYDi0xkllu1czQLhrGGSWNv2lgWkik3AUGL7vSusILaIgLzE k94bYJOYBaQkrm9czQ5iCwsES1zd/5sZxGYRUJXoPLmBsYuRg4NXwF3iyjQvEFNCQEFiziQb iL172CSWfvCFqBaQ+Db5EAtEiazEpgPMECWSEgdX3GCZwCi4gJFhFaNoakFyQXFSepGRXnFi bnFpXrpecn7uJkZgMJ3+96xvB+PNA9aHGJOBxk1klhJNzgcGY15JvKGxibmpsamZkaWlpSlp wkrivPKXZAKFBNITS1KzU1MLUovii0pzUosPMTJxcEo1MPIdyQphCz3xJfGsqcIEm5g3Nzd8 3cO1OVhE37SmZNunCeJJCn77Jyit6T08O2dZGFOE04uLm9bPPbpFTjZsrnGAQNYB2U8lVitY r+6qDnTtit6c3vRjpb/xinXWzzkWfnVpf55x4vYbbt2U1Cg7ZdV3Lql5fTYMwXEvtPMyP7Xq n5K68PhAhxJLcUaioRZzUXEiAE+zajA8AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42I5/e+xoO5WLrVAgykHdSx6NmxldWD0+LxJ LoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYx48mu/SwFLzkrJm9Zyd7A uISji5GTQ0LARGJz30w2CFtM4sK99UA2F4eQwHRGiWU7V7NAOGuYJNa2vWUBqWITMJTYfu8K K4gtIiAv8aT3Blg3s4CUxPWNq9lBbGGBYImr+38zg9gsAqoSnSc3MHYxcnDwCrhLXJnmBWJK CChIzJlkM4GRewEjwypG0dSC5ILipPRcQ73ixNzi0rx0veT83E2M4HB9JrWDcWWDxSFGAQ5G JR7eBS9VAoVYE8uKK3MPMUpwMCuJ8NowqQUK8aYkVlalFuXHF5XmpBYfYkwG2j2RWUo0OR8Y S3kl8YbGJuamxqaWJhYmZpakCSuJ8zKeehIgJJCeWJKanZpakFoEs4WJg1OqgXGXdEqo2cXr Daf/lawX1A/axyZlfjkyTrKoXmnV3NBg44nTpob8L+Zf8SvrjUZy7f4Z33b0921xP5DbcWvK 0Y1va879/l9jpnI2sPctX9v07ds2KmnpbXtxcdH967/2/lncH8V/zmTdtOn65Yd8uk7qXv/S FOh9WC5hCeMNHzZdlv8blDZV33mnxFKckWioxVxUnAgAq94iLpsCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Changing the variable type to 'int' from 'unsigned int'. Driver logic expects the variable type to be 'int'. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/s5p-fimc/fimc-lite-reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c index f0af075..3c7dd65 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite-reg.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite-reg.c @@ -128,7 +128,7 @@ static const u32 src_pixfmt_map[8][3] = { void flite_hw_set_source_format(struct fimc_lite *dev, struct flite_frame *f) { enum v4l2_mbus_pixelcode pixelcode = dev->fmt->mbus_code; - unsigned int i = ARRAY_SIZE(src_pixfmt_map); + int i = ARRAY_SIZE(src_pixfmt_map); u32 cfg; while (i-- >= 0) { @@ -224,7 +224,7 @@ static void flite_hw_set_out_order(struct fimc_lite *dev, struct flite_frame *f) { V4L2_MBUS_FMT_VYUY8_2X8, FLITE_REG_CIODMAFMT_CRYCBY }, }; u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); - unsigned int i = ARRAY_SIZE(pixcode); + int i = ARRAY_SIZE(pixcode); while (i-- >= 0) if (pixcode[i][0] == dev->fmt->mbus_code)