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: proximity: irsd200: 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-27-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
88bcfc9e ca2ec078

+1 -2
+1 -2
drivers/iio/proximity/irsd200.c
··· 763 763 struct { 764 764 s16 channel; 765 765 aligned_s64 ts; 766 - } scan; 766 + } scan = { }; 767 767 int ret; 768 768 769 - memset(&scan, 0, sizeof(scan)); 770 769 ret = irsd200_read_data(data, &scan.channel); 771 770 if (ret) 772 771 goto end;