From: Viresh Kumar Date: Fri, 5 Aug 2011 10:02:29 +0000 (+0530) Subject: dmaengine/amba-pl08x: pass (*ptr) to sizeof() instead of (struct xyz) X-Git-Tag: v3.2-rc1~47^2~18^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b201c111c87a4cf36d009abe57c62bd14d17d762;p=pandora-kernel.git dmaengine/amba-pl08x: pass (*ptr) to sizeof() instead of (struct xyz) As mentioned in Documentation/CodingStyle, 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. This patch replaces (struct xyz) with *ptr at several occurrences in driver. Signed-off-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Vinod Koul --- Reading git-diff-tree failed