lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1583544359-515-5-git-send-email-Anson.Huang@nxp.com>
Date:   Sat,  7 Mar 2020 09:25:57 +0800
From:   Anson Huang <Anson.Huang@....com>
To:     shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, dmitry.torokhov@...il.com,
        a.zummo@...ertech.it, alexandre.belloni@...tlin.com,
        rui.zhang@...el.com, daniel.lezcano@...aro.org,
        amit.kucheria@...durent.com, wim@...ux-watchdog.org,
        linux@...ck-us.net, daniel.baluta@....com, linux@...pel-privat.de,
        gregkh@...uxfoundation.org, tglx@...utronix.de,
        m.felsch@...gutronix.de, andriy.shevchenko@...ux.intel.com,
        arnd@...db.de, robh@...nel.org, yuehaibing@...wei.com,
        ronald@...ovation.ch, krzk@...nel.org, leonard.crestez@....com,
        aisheng.dong@....com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        linux-rtc@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-watchdog@...r.kernel.org
Cc:     Linux-imx@....com
Subject: [PATCH V2 5/7] input: keyboard: imx_sc_key: Fix build warning for !CONFIG_IMX_SCU case

Fix below build warning when COMPILE_TEST is enabled while IMX_SCU is not:

drivers/input/keyboard/imx_sc_key.c: In function ‘imx_sc_check_for_events’:
drivers/input/keyboard/imx_sc_key.c:87:27: warning: ‘msg.state’ is used
uninitialized in this function [-Wuninitialized]
state = (bool)(msg.state & 0xff);
                             ^
AR      drivers/input/keyboard/built-in.a

Signed-off-by: Anson Huang <Anson.Huang@....com>
---
new patch.
---
 drivers/input/keyboard/imx_sc_key.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
index 9f809ae..26a12fb 100644
--- a/drivers/input/keyboard/imx_sc_key.c
+++ b/drivers/input/keyboard/imx_sc_key.c
@@ -72,6 +72,7 @@ static void imx_sc_check_for_events(struct work_struct *work)
 	hdr->func = IMX_SC_MISC_FUNC_GET_BUTTON_STATUS;
 	hdr->size = 1;
 
+	msg.state = 0;
 	error = imx_scu_call_rpc(priv->key_ipc_handle, &msg, true);
 	if (error) {
 		dev_err(&input->dev, "read imx sc key failed, error %d\n", error);
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ