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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 19 Feb 2012 23:45:51 -0700
From:	Stephen Warren <swarren@...dia.com>
To:	Linus Walleij <linus.walleij@...ricsson.com>
Cc:	B29396@...escale.com, s.hauer@...gutronix.de, dongas86@...il.com,
	shawn.guo@...aro.org, thomas.abraham@...aro.org, tony@...mide.com,
	linux-kernel@...r.kernel.org, Stephen Warren <swarren@...dia.com>
Subject: [PATCH 11/20] pinctrl: Downgrade pinctrl_get warning when no maps are found

This may be perfectly legitimate. An IP block may get re-used
across SoCs. Not all of those SoCs may need pinmux settings for the
IP block, e.g. if one SoC dedicates pins to that function but
another doesn't. The driver won't know this, and will always
attempt to set up the pinmux. The mapping table defines whether any
HW programming is actually needed.

Signed-off-by: Stephen Warren <swarren@...dia.com>
---
 drivers/pinctrl/core.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 37dfac7..54e24f7 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -542,13 +542,16 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
 		num_maps++;
 	}
 
-	/* We should have atleast one map, right */
-	if (!num_maps) {
-		pr_err("could not find any mux maps for device %s, ID %s\n",
-		       devname, name);
-		kfree(p);
-		return ERR_PTR(-EINVAL);
-	}
+	/*
+	 * This may be perfectly legitimate. An IP block may get re-used
+	 * across SoCs. Not all of those SoCs may need pinmux settings for the
+	 * IP block, e.g. if one SoC dedicates pins to that function but
+	 * another doesn't. The driver won't know this, and will always
+	 * attempt to set up the pinmux. The mapping table defines whether any
+	 * HW programming is actually needed.
+	 */
+	if (!num_maps)
+		dev_info(dev, "zero maps found for state %s\n", name);
 
 	pr_debug("found %u mux maps for device %s, UD %s\n",
 		 num_maps, devname, name);
-- 
1.7.5.4

--
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