Skip to content

Commit a76bff0

Browse files
FrankHBWinterMute
authored andcommitted
Fixed redundant qualifier (#33)
Removed redundant `v` in cast destination type in source expression of `DMA_FILL`. Also fixed some format inconsistency. The top-level `volatile` only qualifies lvalues, otherwise it is ignored. This also eliminates GCC warning: type qualifiers ignored on cast result type [-Wignored-qualifiers].
1 parent 105d494 commit a76bff0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

include/nds/dma.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,16 @@ static inline
208208
\param dest the destination to copy to
209209
\param size the size in bytes of the area to fill. Will be truncated to the nearest word (4 bytes)
210210
*/
211-
void dmaFillWords( u32 value, void* dest, uint32 size) {
212-
#ifdef ARM7
213-
(*(vu32*)0x027FFE04) = (vu32) value;
211+
void dmaFillWords(u32 value, void* dest, uint32 size) {
212+
#ifdef ARM7
213+
(*(vu32*)0x027FFE04) = value;
214214
DMA_SRC(3) = 0x027FFE04;
215-
#else
216-
DMA_FILL(3) = (vuint32)value;
215+
#else
216+
DMA_FILL(3) = value;
217217
DMA_SRC(3) = (uint32)&DMA_FILL(3);
218-
#endif
218+
#endif
219219

220-
DMA_DEST(3) = (uint32)dest;
220+
DMA_DEST(3) = (uint32)dest;
221221
DMA_CR(3) = DMA_SRC_FIX | DMA_COPY_WORDS | (size>>2);
222222
while(DMA_CR(3) & DMA_BUSY);
223223
}
@@ -230,12 +230,12 @@ static inline
230230
\param dest the destination to copy to
231231
\param size the size in bytes of the area to fill. Will be truncated to the nearest half word (2 bytes)
232232
*/
233-
void dmaFillHalfWords( u16 value, void* dest, uint32 size) {
234-
#ifdef ARM7
235-
(*(vu32*)0x027FFE04) = (vu32) value;
233+
void dmaFillHalfWords(u16 value, void* dest, uint32 size) {
234+
#ifdef ARM7
235+
(*(vu32*)0x027FFE04) = (u32)value;
236236
DMA_SRC(3) = 0x027FFE04;
237-
#else
238-
DMA_FILL(3) = (vuint32)value;
237+
#else
238+
DMA_FILL(3) = (uint32)value;
239239
DMA_SRC(3) = (uint32)&DMA_FILL(3);
240240
#endif
241241

0 commit comments

Comments
 (0)