Skip to content

Commit

Permalink
Squash some GCC __always_inline warnings.
Browse files Browse the repository at this point in the history
Change from __always_inline to plain inline to silence warnings about
possibly non-inlinable functions.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
  • Loading branch information
Marti Bolivar committed Oct 30, 2014
1 parent 32b6da1 commit f105675
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion libmaple/include/libmaple/usb_cdcacm.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int usb_cdcacm_get_n_data_bits(void); /* bDataBits */

void usb_cdcacm_set_hooks(unsigned hook_flags, void (*hook)(unsigned, void*));

static __always_inline void usb_cdcacm_remove_hooks(unsigned hook_flags) {
static inline void usb_cdcacm_remove_hooks(unsigned hook_flags) {
usb_cdcacm_set_hooks(hook_flags, 0);
}

Expand Down
14 changes: 7 additions & 7 deletions libmaple/stm32f1/include/series/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ extern void spi_config_gpios(struct spi_dev*, uint8,
* @brief Deprecated. Use spi_config_gpios() instead.
* @see spi_config_gpios()
*/
static __always_inline void spi_gpio_cfg(uint8 as_master,
struct gpio_dev *nss_dev,
uint8 nss_bit,
struct gpio_dev *comm_dev,
uint8 sck_bit,
uint8 miso_bit,
uint8 mosi_bit) {
static inline void spi_gpio_cfg(uint8 as_master,
struct gpio_dev *nss_dev,
uint8 nss_bit,
struct gpio_dev *comm_dev,
uint8 sck_bit,
uint8 miso_bit,
uint8 mosi_bit) {
/* We switched style globally to foo_config_gpios() and always
* taking a foo_dev* argument (that last bit is the important
* part) after this function was written.
Expand Down
4 changes: 2 additions & 2 deletions wirish/include/wirish/ext_interrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void detachInterrupt(uint8 pin);
*
* @see noInterrupts()
*/
static __always_inline void interrupts() {
static inline void interrupts() {
nvic_globalirq_enable();
}

Expand All @@ -120,7 +120,7 @@ static __always_inline void interrupts() {
*
* @see interrupts()
*/
static __always_inline void noInterrupts() {
static inline void noInterrupts() {
nvic_globalirq_disable();
}

Expand Down

0 comments on commit f105675

Please sign in to comment.