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: 1923031 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 276CDDF25A for ; Wed, 2 Jan 2013 10:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752638Ab3ABKxu (ORCPT ); Wed, 2 Jan 2013 05:53:50 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:49534 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633Ab3ABKxs (ORCPT ); Wed, 2 Jan 2013 05:53:48 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so7768565pbc.19 for ; Wed, 02 Jan 2013 02:53:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=S8I6rGGUrF5ix1zkBMIDOn3wjhotm2UFQx4qP2Vllt0=; b=GMh2+ZPCvwKJc8oW9OAXjTShhUNJp7kxvr2B8VhcakQsKAs3k8pKFpW1/FxNgXkvar FVATDUF5QWoY+hcYYrcGAL1HAGdZf/fDxFEjMdMxHPmWh3aTmvyuMTdDJ5gW43igq8sn 94LcUCFr1a8a0GhcCAJqqnRxj2z4ogw1Qs+3h1Kl+nIVS7+dCUYH0Tg9PkbJ7wFX63L9 vfwjaGYBZd0GAlvnkIhcuFlkAHB1e6zgusY1cmxXVzcejLXOB+sjadfG6rEXCCK4rle5 BGtyyBqnMu3NWjzON4x7uTO3BG9Hzd22xIff2TTAa7JwvVsvg2qkZiopDrn4Ry6VcBPC Iz2w== 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: ALoCoQl6c3LEzxwLfc8vNVcLabhHWbMwK6U1dwovAxVebP3JgDh3BE0rKAVtt8HBETMfwUiri/Oy Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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();