Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: invensense: remove redundant initialization of variable period

The variable period is being initialized with a value that is never
read, it is being re-assigned a new value later on before it is read.
The initialization is redundant and can be removed.

Cleans up clang scan build warning:
Value stored to 'period' during its initialization is never
read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240106153202.54861-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Colin Ian King and committed by
Jonathan Cameron
b58b13f1 b2463c49

+1 -1
+1 -1
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
··· 126 126 struct inv_sensors_timestamp_interval *it; 127 127 int64_t delta, interval; 128 128 const uint32_t fifo_mult = fifo_period / ts->chip.clock_period; 129 - uint32_t period = ts->period; 129 + uint32_t period; 130 130 bool valid = false; 131 131 132 132 if (fifo_nb == 0)