On Tue, Aug 08, 2023 at 03:12:07PM +0000, Haiyang Zhang wrote: > > Do I have to initialize it, or just add a code comment explaining like above? > It depends on if mana_rx_skb() is going to be inlined or not. This is both from a theoretical and pratical perspective. Theoretical: Passing uninitialized memory is undefined in C and it's a bug, but if the function is inline then it's not really "passing" is it? Pratical: If it's not inlined then KMemsan will likely warn about it at runtime but if it is inlined then. The other thing to consider is that these days the compiler is going to automatically initialize it to zero anyway, so manually setting it to zero will not affect runtime. regards, dan carpenter