Re: [PATCH 1/2] i2c-imx: Use the preferred form for passing a size of a struct

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

 



On Fri, Nov 07, 2014 at 12:44:34AM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> 
> 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.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

Squashed the two and applied to for-next, thanks!

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux