From: Vitaly Osipov Date: Sat, 14 Jun 2014 11:47:21 +0000 (+1000) Subject: staging: rtl8712: replace kmalloc(..., sizeof(T)) X-Git-Tag: cleanup-for-v3.18~125^2~1717 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd9dc62c365c0a6cf12d571ec0a2f10218a30c81;p=pandora-kernel.git staging: rtl8712: replace kmalloc(..., sizeof(T)) As suggested by Andy Shevchenko on driverdev-devel, replace v = ... sizeof(struct type_of_v) -> sizeof(*v) Based on a cocci patch along the lines of @@ type T; expression E; identifier V; @@ T *V; ... - V = kmalloc(sizeof(T), E); + V = kmalloc(sizeof(*V), E); @@ type T; expression E; identifier V; @@ T *V; ... - V = kzalloc(sizeof(T), E); + V = kzalloc(sizeof(*V), E); Signed-off-by: Vitaly Osipov Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed