Skip to content

Commit e64286b

Browse files
author
Cruz Monrreal
authored
Merge pull request #9863 from deepikabhavnani/old_commit_revert
Revert "Update params in calls to LDREXW/STREXW to uint32_t"
2 parents 74d8315 + e0b4b51 commit e64286b

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
130130
{
131131
uint32_t newValue;
132132
do {
133-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask;
133+
newValue = (uint32_t)__LDREXW(ptr) | mask;
134134

135-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
135+
} while (__STREXW(newValue, ptr));
136136
}
137137

138138

139139
static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
140140
{
141141
uint32_t newValue;
142142
do {
143-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask;
143+
newValue = (uint32_t)__LDREXW(ptr) &~mask;
144144

145-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
145+
} while (__STREXW(newValue, ptr));
146146
}
147147

148148
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )

targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
133133
{
134134
uint32_t newValue;
135135
do {
136-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask;
136+
newValue = (uint32_t)__LDREXW(ptr) | mask;
137137

138-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
138+
} while (__STREXW(newValue, ptr));
139139
}
140140

141141
// MBED patch
142142
static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
143143
{
144144
uint32_t newValue;
145145
do {
146-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask;
146+
newValue = (uint32_t)__LDREXW(ptr) &~mask;
147147

148-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
148+
} while (__STREXW(newValue, ptr));
149149
}
150150

151151
// MBED patch

targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,19 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
131131
{
132132
uint32_t newValue;
133133
do {
134-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask;
134+
newValue = (uint32_t)__LDREXW(ptr) | mask;
135135

136-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
136+
} while (__STREXW(newValue, ptr));
137137
}
138138

139139

140140
static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
141141
{
142142
uint32_t newValue;
143143
do {
144-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask;
144+
newValue = (uint32_t)__LDREXW(ptr) &~mask;
145145

146-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
146+
} while (__STREXW(newValue, ptr));
147147
}
148148
/* MBED */
149149

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
130130
{
131131
uint32_t newValue;
132132
do {
133-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask;
133+
newValue = (uint32_t)__LDREXW(ptr) | mask;
134134

135-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
135+
} while (__STREXW(newValue, ptr));
136136
}
137137

138138

139139
static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
140140
{
141141
uint32_t newValue;
142142
do {
143-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask;
143+
newValue = (uint32_t)__LDREXW(ptr) &~mask;
144144

145-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
145+
} while (__STREXW(newValue, ptr));
146146
}
147147

148148
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )

targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ static inline void atomic_set_u32(volatile uint32_t *ptr, uint32_t mask)
133133
{
134134
uint32_t newValue;
135135
do {
136-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) | mask;
136+
newValue = (uint32_t)__LDREXW(ptr) | mask;
137137

138-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
138+
} while (__STREXW(newValue, ptr));
139139
}
140140

141141
// Added for MBED PR #3062
142142
static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
143143
{
144144
uint32_t newValue;
145145
do {
146-
newValue = (uint32_t)__LDREXW((volatile uint32_t *)ptr) &~mask;
146+
newValue = (uint32_t)__LDREXW(ptr) &~mask;
147147

148-
} while (__STREXW(newValue,(volatile uint32_t *) ptr));
148+
} while (__STREXW(newValue, ptr));
149149
}
150150

151151
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */

0 commit comments

Comments
 (0)