From 1e5db5c3aca5f3908415d61dfdcb9763adaa554d Mon Sep 17 00:00:00 2001 From: barthess Date: Wed, 8 Aug 2012 18:42:15 +0000 Subject: I2C. Removed unneded return. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4545 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/I2Cv1/i2c_lld.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/os/hal/platforms/STM32/I2Cv1/i2c_lld.c b/os/hal/platforms/STM32/I2Cv1/i2c_lld.c index 08c7ee40b..5c18db706 100644 --- a/os/hal/platforms/STM32/I2Cv1/i2c_lld.c +++ b/os/hal/platforms/STM32/I2Cv1/i2c_lld.c @@ -281,11 +281,9 @@ static void i2c_lld_set_opmode(I2CDriver *i2cp) { * * @param[in] i2cp pointer to the @p I2CDriver object * - * @return Useless value to protect last instruction from - * optimization out. * @notapi */ -static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) { +static void i2c_lld_serve_event_interrupt(I2CDriver *i2cp) { I2C_TypeDef *dp = i2cp->i2c; uint32_t regSR2 = dp->SR2; uint32_t event = dp->SR1; @@ -314,7 +312,7 @@ static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) { /* Starts "read after write" operation, LSB = 1 -> receive.*/ i2cp->addr |= 0x01; dp->CR1 |= I2C_CR1_START | I2C_CR1_ACK; - return regSR2; + return; } dp->CR2 &= ~I2C_CR2_ITEVTEN; dp->CR1 |= I2C_CR1_STOP; @@ -325,8 +323,7 @@ static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) { } /* Clear ADDR flag. */ if (event & (I2C_SR1_ADDR | I2C_SR1_ADD10)) - regSR2 = dp->SR2; - return regSR2; + (void)dp->SR2; } /** -- cgit v1.2.3