From patchwork Wed Jan 2 10:45:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13763 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9450823EDC for ; Wed, 2 Jan 2013 10:53:50 +0000 (UTC) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id 44E5DA1898F for ; Wed, 2 Jan 2013 10:53:50 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id ft2so2454110vbb.9 for ; Wed, 02 Jan 2013 02:53:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=S8I6rGGUrF5ix1zkBMIDOn3wjhotm2UFQx4qP2Vllt0=; b=iq5raa511fopFuQyShvZzF5SNSmK9mQavkQwnCTu+PMynUqc4J//a/1Nff48wK6oGA qgGwW1zRwY6SFhUwAJ7H212XZTNwxIhPUQb/iQWl0jEuWvXa3OMp0jPQHOw59ebeGhaC HEmbat8lWJrqaukoBXIIkTRQs61cQvoX0Qrv3PzY4V4oGoa5GxzHaGdVs09vBUNafYAO IYpupfvGBbtM1SKLqs5yQWFPB6PGrDI7Dj0brJNxEHYdqOGCuY3KBZkJ90ua8eqtVESo Y1fqu5bNKxNo/Bx+fq25j7fkbFDE6i7B+Iz0uiYSrSGNjRjoiSo5m+asLMze1+6tY4c/ +akw== X-Received: by 10.52.70.205 with SMTP id o13mr61256735vdu.75.1357124029767; Wed, 02 Jan 2013 02:53:49 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp40264veb; Wed, 2 Jan 2013 02:53:49 -0800 (PST) X-Received: by 10.68.252.69 with SMTP id zq5mr142771649pbc.104.1357124028776; Wed, 02 Jan 2013 02:53:48 -0800 (PST) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id pu7si12505551pbc.97.2013.01.02.02.53.48 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 02:53:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f46.google.com with SMTP id bh2so7941409pad.33 for ; Wed, 02 Jan 2013 02:53:48 -0800 (PST) X-Received: by 10.68.241.232 with SMTP id wl8mr142012150pbc.144.1357124028316; Wed, 02 Jan 2013 02:53:48 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oz9sm28247908pbb.68.2013.01.02.02.53.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 02:53:47 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, s.nawrocki@samsung.com, sylvester.nawrocki@gmail.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH Resend] [media] s5p-mfc: Fix an error check Date: Wed, 2 Jan 2013 16:15:49 +0530 Message-Id: <1357123549-14264-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkA7T0pRGWeeBEhXj3GjgdMrAguum9afpGWchyMywIxYjtBpWRCOWzuIrEQLojPVSQLi7Jw Checking unsigned variable for negative value always returns false. Hence make this value signed as we expect it to be negative too. Fixes the following smatch warning: drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:572 s5p_mfc_set_enc_ref_buffer_v6() warn: unsigned 'buf_size1' is never less than zero. Signed-off-by: Sachin Kamat --- Added additional description in commit message. Please ignore the previous patch. --- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c index 5f9a5e0..91d5087 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c @@ -535,8 +535,8 @@ void s5p_mfc_get_enc_frame_buffer_v6(struct s5p_mfc_ctx *ctx, int s5p_mfc_set_enc_ref_buffer_v6(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev = ctx->dev; - size_t buf_addr1, buf_size1; - int i; + size_t buf_addr1; + int i, buf_size1; mfc_debug_enter();