From patchwork Mon Dec 17 08:52:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1886361 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 1AD88DF215 for ; Mon, 17 Dec 2012 08:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822Ab2LQIvj (ORCPT ); Mon, 17 Dec 2012 03:51:39 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:38700 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674Ab2LQIvj (ORCPT ); Mon, 17 Dec 2012 03:51:39 -0500 Received: from avalon.quadriga.com (unknown [194.136.87.244]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 12A9B359DB; Mon, 17 Dec 2012 09:51:38 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: sakari.ailus@iki.fi Subject: [PATCH] omap3isp: ispqueue: Fix uninitialized variable compiler warnings Date: Mon, 17 Dec 2012 09:52:48 +0100 Message-Id: <1355734368-6908-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org drivers/media/platform/omap3isp/ispqueue.c:399:18: warning: 'pa' may be used uninitialized in this function [-Wuninitialized] This is a false positive but the compiler has no way to know about it, so initialize the variable to 0. drivers/media/platform/omap3isp/ispqueue.c:445:6: warning: 'vm_page_prot' may be used uninitialized in this function [-Wuninitialized] This is a false positive and the compiler should know better. Use uninitialized_var(). Signed-off-by: Laurent Pinchart --- drivers/media/platform/omap3isp/ispqueue.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c index 15bf3ea..1388eb7 100644 --- a/drivers/media/platform/omap3isp/ispqueue.c +++ b/drivers/media/platform/omap3isp/ispqueue.c @@ -366,7 +366,7 @@ static int isp_video_buffer_prepare_pfnmap(struct isp_video_buffer *buf) unsigned long this_pfn; unsigned long start; unsigned long end; - dma_addr_t pa; + dma_addr_t pa = 0; int ret = -EFAULT; start = buf->vbuf.m.userptr; @@ -419,7 +419,7 @@ done: static int isp_video_buffer_prepare_vm_flags(struct isp_video_buffer *buf) { struct vm_area_struct *vma; - pgprot_t vm_page_prot; + pgprot_t uninitialized_var(vm_page_prot); unsigned long start; unsigned long end; int ret = -EFAULT;