
12 Jul
2017
12 Jul
'17
7:31 p.m.
On Wed, Jul 12, 2017 at 11:55:53AM +0200, Jean-Jacques Hiblot wrote:
In the TI SOCs a PBIAS cell exists to provide a bias voltage to the MMC1 IO cells. Without this bias voltage these I/O cells can not function properly. The PBIAS cell is controlled by software.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com
Reviewed-by: Tom Rini trini@konsulko.com
But a minor thing:
- if (!*p) {
+#ifdef DEBUG
int i = 0;
const char *s;
debug("regulator ");
while ((s = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev),
"regulator-name", i++, NULL)))
debug("%s'%s' ", (i > 1) ? ", " : "", s);
debug("%s not supported\n", (i > 2) ? "are" : "is");
+#endif
return -EINVAL;
- }
We should not need the DEBUG guard here as the string constants will get discarded with gcc-6.x (default min requirement starting in v2018.01) and a while(...) do nothing should get optimized away, and even if not, it's just the error case. I think we can stand clearer reading code here compared with a few extra bytes.
--
Tom