Skip to contentSkip to conversation

bus: uniphier-system-bus: fix condition of overlap check

PATCH Applied Kunihiko Hayashi 3 participants 3 messages Apr 1, 2016 – Apr 12, 2016 Arm/uniphier architecture

lore
Share & tools
lore

Kunihiko Hayashi

author maintainer
#0 lore raw

PATCH 1/1 bus: uniphier-system-bus: fix condition of overlap check

This patch fixes condition whether the specified address ranges overlap each other.

Fixes 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver")
---
 drivers/bus/uniphier-system-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/uniphier-system-bus.c +1 -1
index 834a2ae..350b730 100644
@@ -108,7 +108,7 @@ static int uniphier_system_bus_check_overlap(
 
 	for (i = 0; i < ARRAY_SIZE(priv->bank); i++) {
 		for (j = i + 1; j < ARRAY_SIZE(priv->bank); j++) {
-			if (priv->bank[i].end > priv->bank[j].base ||
+			if (priv->bank[i].end > priv->bank[j].base &&
 			    priv->bank[i].base < priv->bank[j].end) {
 				dev_err(priv->dev,
 					"region overlap between bank%d and bank%d\n",
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

2016-04-01 19:32 GMT+09:00 Kunihiko Hayashi <[email protected]>:

Quoted 6 lines

This patch fixes condition whether the specified address ranges overlap each other.

Fixes 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver")

---

Arnd, Olof,

Could you pick up this bug-fix for v4.6, please?

Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw
Quoted 8 lines · Masahiro Yamada

2016-04-01 19:32 GMT+09:00 Kunihiko Hayashi <[email protected]>:

Quoted 6 lines

This patch fixes condition whether the specified address ranges overlap each other.

Fixes 4b7f48d395a7 ("bus: uniphier-system-bus: add UniPhier System Bus driver")

---

Quoted 6 lines

Arnd, Olof,

Could you pick up this bug-fix for v4.6, please?

Applied to fixes.

-Olof