Re: [PATCH 02/30] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Christophe Leroy
Le 03/07/2019 à 15:13, Fuqian Huang a écrit : kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and

[PATCH 02/30] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use