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]
Date:	Thu, 15 Jan 2015 23:54:59 -0200
From:	Murilo Opsfelder Araujo <mopsfelder@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
	jon.nettleton@...il.com, dsd@...top.org, jfrederich@...il.com,
	Murilo Opsfelder Araujo <mopsfelder@...il.com>
Subject: [PATCH 1/2] staging: olpc_dcon: check for CONFIG_OLPC before calling olpc_board_at_least()

The following error messages are thrown by sparse when CONFIG_OLPC is
not defined:

drivers/staging/olpc_dcon/olpc_dcon.c:147:17: error: undefined identifier 'olpc_board_at_least'
drivers/staging/olpc_dcon/olpc_dcon.c:208:14: error: undefined identifier 'olpc_board_at_least'

This patch fixes these errors.

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@...il.com>
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 6a9a881..3708f1e 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -144,7 +144,9 @@ power_up:
 	}
 	if (x < 0) {
 		pr_err("unable to stabilize dcon's smbus, reasserting power and praying.\n");
+#ifdef CONFIG_OLPC
 		BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
+#endif
 		pm = 0;
 		olpc_ec_cmd(EC_DCON_POWER_MODE, &pm, 1, NULL, 0);
 		msleep(100);
@@ -205,8 +207,10 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 	if (dcon->asleep == sleep)
 		return;
 
+#ifdef CONFIG_OLPC
 	if (!olpc_board_at_least(olpc_board(0xc2)))
 		return;
+#endif
 
 	if (sleep) {
 		u8 pm = 0;
@@ -795,11 +799,14 @@ struct i2c_driver dcon_driver = {
 
 static int __init olpc_dcon_init(void)
 {
+#ifdef CONFIG_OLPC
 #ifdef CONFIG_FB_OLPC_DCON_1_5
 	/* XO-1.5 */
 	if (olpc_board_at_least(olpc_board(0xd0)))
 		pdata = &dcon_pdata_xo_1_5;
 #endif
+#endif
+
 #ifdef CONFIG_FB_OLPC_DCON_1
 	if (!pdata)
 		pdata = &dcon_pdata_xo_1;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ