[PATCH v3 1/5] of/selftest: Fix GPIOs selftest to cover the 7th case

2013-02-12 Thread Grant Likely
The of_gpio_named_count() self test doesn't hit the out-of-range
condition even though it is coded. Fix the bug by increasing the for
loop range by one.

Reported-by: Andreas Larsson 
Cc: Rob Herring 
Signed-off-by: Grant Likely 
---
 drivers/of/selftest.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c
index f24ffd7..9f62eb5 100644
--- a/drivers/of/selftest.c
+++ b/drivers/of/selftest.c
@@ -35,7 +35,7 @@ static void __init of_selftest_parse_phandle_with_args(void)
return;
}
 
-   for (i = 0; i < 7; i++) {
+   for (i = 0; i < 8; i++) {
bool passed = true;
rc = of_parse_phandle_with_args(np, "phandle-list",
"#phandle-cells", i, );
-- 
1.7.10.4

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


[PATCH v3 1/5] of/selftest: Fix GPIOs selftest to cover the 7th case

2013-02-12 Thread Grant Likely
The of_gpio_named_count() self test doesn't hit the out-of-range
condition even though it is coded. Fix the bug by increasing the for
loop range by one.

Reported-by: Andreas Larsson andr...@gaisler.com
Cc: Rob Herring rob.herr...@calxeda.com
Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---
 drivers/of/selftest.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c
index f24ffd7..9f62eb5 100644
--- a/drivers/of/selftest.c
+++ b/drivers/of/selftest.c
@@ -35,7 +35,7 @@ static void __init of_selftest_parse_phandle_with_args(void)
return;
}
 
-   for (i = 0; i  7; i++) {
+   for (i = 0; i  8; i++) {
bool passed = true;
rc = of_parse_phandle_with_args(np, phandle-list,
#phandle-cells, i, args);
-- 
1.7.10.4

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