Skip to contentSkip to conversation

armv7m: mpu_config add missing break

PATCH New Heinrich Schuchardt 3 participants 3 messages Jul 30, 2017 – Aug 14, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv7m: mpu_config add missing break

For DEVICE_NON_SHARED the newly assigned value of attr is overwritten due to a missing break.

The problem was indicated by cppcheck.

---
 arch/arm/cpu/armv7m/mpu.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7m/mpu.c +1 -0
index 31a243b49a..4622aa4826 100644
@@ -68,6 +68,7 @@ void mpu_config(struct mpu_region_config *reg_config)
 		break;
 	case DEVICE_NON_SHARED:
 		attr = (2 << TEX_SHIFT) | BUFFERABLE;
+		break;
 	default:
 		attr = 0; /* strongly ordered */
 		break;
Signature · 1 line
2.13.2
#1 lore raw

PATCH 1/1 armv7m: mpu_config add missing break

Hi,

Quoted 6 lines · Heinrich Schuchardt

For DEVICE_NON_SHARED the newly assigned value of attr is overwritten due to a missing break.

The problem was indicated by cppcheck.

Cheers,
Vikas

Quoted 17 lines
---
 arch/arm/cpu/armv7m/mpu.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7m/mpu.c +1 -0
index 31a243b49a..4622aa4826 100644
@@ -68,6 +68,7 @@ void mpu_config(struct mpu_region_config *reg_config)
 		break;
 	case DEVICE_NON_SHARED:
 		attr = (2 << TEX_SHIFT) | BUFFERABLE;
+		break;
 	default:
 		attr = 0; /* strongly ordered */
 		break;
#2 lore raw

PATCH 1/1 armv7m: mpu_config add missing break

In reply to Heinrich Schuchardt
Quoted 6 lines · xypron.glpk at gmx.de

For DEVICE_NON_SHARED the newly assigned value of attr is overwritten due to a missing break.

The problem was indicated by cppcheck.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170813/bf29ed7d/attachment.sig>