[riot-notifications] [RIOT-OS/RIOT] cpu/cortexm_common: irq_enable returns the current state of interrupts (not previous) (#10076)

Marian Buschsieweke notifications at github.com
Tue Jul 23 09:24:02 CEST 2019


How about updating the API to return `void`?

No one is using the return value anyway:

```
boards/arduino-leonardo/board.c:41:    irq_enable();
boards/waspmote-pro/board.c:67:    irq_enable();
boards/common/msb-430/board_init.c:107:    irq_enable();
boards/common/atmega/board.c:47:    irq_enable();
boards/chronos/board_init.c:96:    irq_enable();
core/include/irq.h:50:unsigned irq_enable(void);
sys/arduino/serialport.cpp:160:    irq_enable();
drivers/motor_driver/motor_driver.c:176:    irq_enable();
drivers/motor_driver/motor_driver.c:240:    irq_enable();
cpu/native/native_cpu.c:227:        irq_enable();
cpu/native/startup.c:545:    irq_enable();
cpu/native/irq_cpu.c:214:        irq_enable();
cpu/atmega_common/thread_arch.c:218:    irq_enable();
cpu/cc430/cc430-adc.c:75:    irq_enable();
cpu/fe310/cpu.c:335:    irq_enable();
cpu/msp430_common/msp430-main.c:116:    irq_enable();
```

Unused APIs (or unused features of APIs) tend to be untested and buggy. Alternatively, I could PR a test for the correct implementation of the API.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10076#issuecomment-514087360
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190723/5d3beca4/attachment-0001.htm>


More information about the notifications mailing list