From: Lee Jones <lee.jones@linaro.org>
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 <lee.jones@linaro.org>
Subject: [PATCH 4/4] mfd: rtsx: Prevent 'used uninitialised' warnings
Date: Thu, 14 Nov 2013 09:29:15 +0000 [thread overview]
Message-ID: <1384421355-4434-5-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1384421355-4434-1-git-send-email-lee.jones@linaro.org>
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 <lee.jones@linaro.org>
---
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);
--
1.8.1.2
prev parent reply other threads:[~2013-11-14 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 9:29 [PATCH 0/4] mfd: rtsx: Decrease driver size and add new device Lee Jones
2013-11-14 9:29 ` [PATCH 1/4] mfd: rtsx: Generify call-back operations in order to reduce code duplication Lee Jones
2013-11-15 3:43 ` [PATCH 1/4] mfd: rtsx: Generify call-back operations in orderto " micky
2013-11-14 9:29 ` [PATCH 2/4] mfd: rtsx: Generify the switch voltage routine Lee Jones
2013-11-15 2:59 ` micky
2013-11-15 15:37 ` Lee Jones
2013-11-14 9:29 ` [PATCH 3/4] mfd: rtsx: Add rtl8402 card reader Lee Jones
2013-11-14 9:29 ` Lee Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384421355-4434-5-git-send-email-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=micky_ching@realsil.com.cn \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®