From patchwork Thu Nov 14 09:29:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 21495 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 620AD23FBC for ; Thu, 14 Nov 2013 09:29:43 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id qd12sf3786818ieb.0 for ; Thu, 14 Nov 2013 01:29:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=JN9bISA5TCcQz7kiiBlqWKldjUYMCghnLyKi2hrVeMA=; b=WMS/KQPD1scxQZ681u4IDGdlOSYqYenl7e9uxfCA+Ff9UC3DX6PCza+CpeuUmkngNZ ozSNh1qqy1+cqsnNK5SqNP+Qc7IUFhq25/UrtaS0sSH0LOsTS60H208b0J9qLQMWavOi w5kEBQpwJslDc6CztPvzOvP64+GGbqVe1Xbd1/Ef2LBgiucxEp+jwIuLB6JorhSqevd+ F0XMdhB/MrEwHoZelIRg27435WmbG/o+KVtknmAi1nUZ7TDzWfeGsBCytPlj38EK8jDC Nvw1MftD/cnkywgSvufbavS9rxs/GdBVzeKKU8ES4F+MywV+phTyEEr+znF/nWUngDb0 b2Sg== X-Gm-Message-State: ALoCoQk9tYjlOJ/Me5X6W8jGlBI6J93W83B6pseqwu5knNdnWfxO68fqyxudbU2OmZty4zyP0fTt X-Received: by 10.182.109.164 with SMTP id ht4mr206572obb.16.1384421383061; Thu, 14 Nov 2013 01:29:43 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.132.9 with SMTP id oq9ls927708qeb.38.gmail; Thu, 14 Nov 2013 01:29:42 -0800 (PST) X-Received: by 10.220.123.6 with SMTP id n6mr198437vcr.28.1384421382966; Thu, 14 Nov 2013 01:29:42 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id v1si14073238vdh.87.2013.11.14.01.29.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id jz11so1525923veb.22 for ; Thu, 14 Nov 2013 01:29:42 -0800 (PST) X-Received: by 10.52.231.39 with SMTP id td7mr137552vdc.106.1384421382877; Thu, 14 Nov 2013 01:29:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp302030vcz; Thu, 14 Nov 2013 01:29:42 -0800 (PST) X-Received: by 10.182.220.225 with SMTP id pz1mr352899obc.51.1384421382347; Thu, 14 Nov 2013 01:29:42 -0800 (PST) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by mx.google.com with ESMTPS id jb8si29128948obb.14.2013.11.14.01.29.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.181 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.214.181; Received: by mail-ob0-f181.google.com with SMTP id uz6so1847216obc.40 for ; Thu, 14 Nov 2013 01:29:42 -0800 (PST) X-Received: by 10.182.113.195 with SMTP id ja3mr450984obb.46.1384421382032; Thu, 14 Nov 2013 01:29:42 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id rr6sm5545348oeb.0.2013.11.14.01.29.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:41 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com, micky_ching@realsil.com.cn Cc: linus.walleij@linaro.org, Lee Jones Subject: [PATCH 4/4] mfd: rtsx: Prevent 'used uninitialised' warnings Date: Thu, 14 Nov 2013 09:29:15 +0000 Message-Id: <1384421355-4434-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1384421355-4434-1-git-send-email-lee.jones@linaro.org> References: <1384421355-4434-1-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , drivers/mfd/rtl8411.c: In function ‘rtl8411_fetch_vendor_settings’: drivers/mfd/rtl8411.c:58:7: warning: ‘reg1’ is used uninitialized in this function [-Wuninitialized] drivers/mfd/rtl8411.c: In function ‘rtl8411b_fetch_vendor_settings’: drivers/mfd/rtl8411.c:79:7: warning: ‘reg’ is used uninitialized in this function [-Wuninitialized] drivers/mfd/rtl8411.c: In function ‘rtl8411_fetch_vendor_settings’: drivers/mfd/rtl8411.c:69:26: warning: ‘reg3’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Lee Jones --- drivers/mfd/rtl8411.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index 0771796..cb8416c 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c @@ -49,8 +49,8 @@ static int rtl8411b_is_qfn48(struct rtsx_pcr *pcr) static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) { - u32 reg1; - u8 reg3; + u32 reg1 = 0; + u8 reg3 = 0; rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); @@ -71,7 +71,7 @@ static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) { - u32 reg; + u32 reg = 0; rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);