Thread (46 messages) 46 messages, 13 authors, 2025-06-14

Re: [PATCH 00/28] iio: zero init stack with { } instead of memset()

From: Pavel Machek <hidden>
Date: 2025-06-12 18:54:10
Also in: linux-iio, linux-mediatek, linux-rockchip, lkml

Hi1
I thought I'd chime in as someone uninvolved because this seemed
interesting.

On Thursday, 12 June 2025 11:17:52 Central European Summer Time Pavel Machek wrote:
quoted
Hi!
quoted
Jonathan mentioned recently that he would like to get away from using
memset() to zero-initialize stack memory in the IIO subsystem. And we
have it on good authority that initializing a struct or array with = { }
is the preferred way to do this in the kernel [1]. So here is a series
to take care of that.
1) Is it worth the churn?

2) Will this fail to initialize padding with some obscure compiler?
as of right now, the only two C compilers that are supported are
GCC >= 8.1, and Clang >= 13.0.1. If anyone even manages to get the
kernel
Well... I'm pretty sure parts of this would make it into -stable as a
dependency, or because AUTOSEL decides it is a bugfix. So..

GNU C                  4.9              gcc --version
Clang/LLVM (optional)  10.0.1           clang --version

:-).

Best regards,
									Pavel
-- 
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help