Re: [bug report] net: mana: Add page pool for RX buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux