mirror of https://github.com/torvalds/linux.git
iio: accel: msa311: use = { } instead of memset()
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-2-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
f448fb868a
commit
08ef45efc2
|
|
@ -897,9 +897,7 @@ static irqreturn_t msa311_buffer_thread(int irq, void *p)
|
|||
struct {
|
||||
__le16 channels[MSA311_SI_Z + 1];
|
||||
aligned_s64 ts;
|
||||
} buf;
|
||||
|
||||
memset(&buf, 0, sizeof(buf));
|
||||
} buf = { };
|
||||
|
||||
mutex_lock(&msa311->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue