mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
d0b03c5fe4
Reimplement a call to devm_request_mem_region followed by a call to ioremap or ioremap_nocache by a call to devm_request_and_ioremap. The semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // <smpl> @nm@ expression myname; identifier i; @@ struct platform_driver i = { .driver = { .name = myname } }; @@ expression dev,res,size; expression nm.myname; @@ -if (!devm_request_mem_region(dev, res->start, size, - \(res->name\|dev_name(dev)\|myname\))) { - ... - return ...; -} ... when != res->start ( -devm_ioremap(dev,res->start,size) +devm_request_and_ioremap(dev,res) | -devm_ioremap_nocache(dev,res->start,size) +devm_request_and_ioremap(dev,res) ) ... when any when != res->start // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
amd-rng.c | ||
atmel-rng.c | ||
core.c | ||
geode-rng.c | ||
intel-rng.c | ||
ixp4xx-rng.c | ||
Kconfig | ||
Makefile | ||
mxc-rnga.c | ||
n2-asm.S | ||
n2-drv.c | ||
n2rng.h | ||
nomadik-rng.c | ||
octeon-rng.c | ||
omap-rng.c | ||
pasemi-rng.c | ||
picoxcell-rng.c | ||
ppc4xx-rng.c | ||
timeriomem-rng.c | ||
tx4939-rng.c | ||
via-rng.c | ||
virtio-rng.c |