Re: [PATCH 3/4] libnvdimm: eliminate two unnecessary zero initializations in badrange.c

2020-08-26 Thread Leizhen (ThunderTown)
I will drop this patch, because badrange_add() is unlikely to be called. There's no need to care about trivial performance improvements. On 2020/8/20 22:30, Zhen Lei wrote: > Currently, the "struct badrange_entry" has three members: start, length, > list. In append_badrange_entry(), "start" and "l

[PATCH 3/4] libnvdimm: eliminate two unnecessary zero initializations in badrange.c

2020-08-20 Thread Zhen Lei
Currently, the "struct badrange_entry" has three members: start, length, list. In append_badrange_entry(), "start" and "length" will be assigned later, and "list" does not need to be initialized before calling list_add_tail(). That means, the kzalloc() in badrange_add() or alloc_and_append_badrange