i2c-stm32f4: remove redundant initialization of pointer reg
authorColin Ian King <[email protected]>
Tue, 16 Jan 2018 17:44:04 +0000 (17:44 +0000)
committerWolfram Sang <[email protected]>
Tue, 27 Feb 2018 12:51:05 +0000 (13:51 +0100)
The pointer reg is assigned a value that is never read, it is later
overwritten with a new value, hence the redundant initialization can
be removed.

Cleans up clang warning:
drivers/i2c/busses/i2c-stm32f4.c:352:16: warning: Value stored to 'reg'
during its initialization is never read

Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Alexandre TORGUE <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
drivers/i2c/busses/i2c-stm32f4.c

index 47c8d00de53f95377e857633035118ba9ed5be31..ba600d77a3f88bc0fc9f15fe138679d8519a0f83 100644 (file)
@@ -349,7 +349,7 @@ static void stm32f4_i2c_read_msg(struct stm32f4_i2c_dev *i2c_dev)
 static void stm32f4_i2c_terminate_xfer(struct stm32f4_i2c_dev *i2c_dev)
 {
        struct stm32f4_i2c_msg *msg = &i2c_dev->msg;
-       void __iomem *reg = i2c_dev->base + STM32F4_I2C_CR2;
+       void __iomem *reg;
 
        stm32f4_i2c_disable_irq(i2c_dev);