From ba9cb7dc5d35087274bf789f393c732805a6b614 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 29 Feb 2016 21:30:31 +0000 Subject: [PATCH] minor stylecheck cleanups --- include/libopencm3/cm3/cortex.h | 2 +- lib/stm32/common/flash_common_f01.c | 4 ++-- tests/gadget-zero/usb-gadget0.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libopencm3/cm3/cortex.h b/include/libopencm3/cm3/cortex.h index 5d974dcb..cca18b38 100644 --- a/include/libopencm3/cm3/cortex.h +++ b/include/libopencm3/cm3/cortex.h @@ -165,7 +165,7 @@ static inline uint32_t __cm_atomic_set(uint32_t *val) } #define __CM_SAVER(state) \ - __val = state, \ + __val = (state), \ __save __attribute__((__cleanup__(__cm_atomic_set))) = \ __cm_atomic_set(&__val) diff --git a/lib/stm32/common/flash_common_f01.c b/lib/stm32/common/flash_common_f01.c index bd2348d2..8c1a79ac 100644 --- a/lib/stm32/common/flash_common_f01.c +++ b/lib/stm32/common/flash_common_f01.c @@ -164,8 +164,8 @@ Status bit polling is used to detect end of operation. void flash_program_word(uint32_t address, uint32_t data) { - flash_program_half_word(address, (uint16_t)data); - flash_program_half_word(address+2, (uint16_t)(data>>16)); + flash_program_half_word(address, (uint16_t)data); + flash_program_half_word(address+2, (uint16_t)(data>>16)); } /*---------------------------------------------------------------------------*/ diff --git a/tests/gadget-zero/usb-gadget0.c b/tests/gadget-zero/usb-gadget0.c index 5f0aa629..b514fcf2 100644 --- a/tests/gadget-zero/usb-gadget0.c +++ b/tests/gadget-zero/usb-gadget0.c @@ -34,10 +34,10 @@ #ifdef ER_DEBUG #include #define ER_DPRINTF(fmt, ...) \ - do { printf(fmt, ## __VA_ARGS__); } while (0) + do { printf(fmt, ## __VA_ARGS__); } while (0) #else #define ER_DPRINTF(fmt, ...) \ - do { } while (0) + do { } while (0) #endif /*