29 Oct
2014
29 Oct
'14
10:48 a.m.
On Fri, Oct 24, 2014 at 01:01:27PM -0200, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
According to Documentation/CodingStyle - Chapter 14:
"The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);
The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not."
So do it as recommeded.
Cc: Charles Keepax ckeepax@opensource.wolfsonmicro.com Signed-off-by: Fabio Estevam fabio.estevam@freescale.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles