dd00cc486a
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
acquirewdt.c | ||
advantechwdt.c | ||
alim1535_wdt.c | ||
alim7101_wdt.c | ||
at32ap700x_wdt.c | ||
at91rm9200_wdt.c | ||
booke_wdt.c | ||
cpu5wdt.c | ||
ep93xx_wdt.c | ||
eurotechwdt.c | ||
i6300esb.c | ||
ib700wdt.c | ||
ibmasr.c | ||
indydog.c | ||
iTCO_vendor_support.c | ||
iTCO_wdt.c | ||
ixp4xx_wdt.c | ||
ixp2000_wdt.c | ||
Kconfig | ||
ks8695_wdt.c | ||
machzwd.c | ||
Makefile | ||
mixcomwd.c | ||
mpc8xx_wdt.c | ||
mpc83xx_wdt.c | ||
mpcore_wdt.c | ||
mtx-1_wdt.c | ||
mv64x60_wdt.c | ||
omap_wdt.c | ||
omap_wdt.h | ||
pc87413_wdt.c | ||
pcwd_pci.c | ||
pcwd_usb.c | ||
pcwd.c | ||
pnx4008_wdt.c | ||
rm9k_wdt.c | ||
s3c2410_wdt.c | ||
sa1100_wdt.c | ||
sbc60xxwdt.c | ||
sbc8360.c | ||
sbc_epx_c3.c | ||
sc520_wdt.c | ||
sc1200wdt.c | ||
scx200_wdt.c | ||
shwdt.c | ||
smsc37b787_wdt.c | ||
softdog.c | ||
w83627hf_wdt.c | ||
w83697hf_wdt.c | ||
w83877f_wdt.c | ||
w83977f_wdt.c | ||
wafer5823wdt.c | ||
wd501p.h | ||
wdrtas.c | ||
wdt285.c | ||
wdt977.c | ||
wdt_pci.c | ||
wdt.c |