xref: /xnu-10002.1.13/tools/cocci/zalloc-data.cocci (revision 1031c584a5e37aff177559b9f69dbd3c8c3fd30a)
1*1031c584SApple OSS Distributions// To apply, at the top of xnu.git:
2*1031c584SApple OSS Distributions// $ spatch --max-width=80 --use-gitgrep --in-place --include-headers --sp-file tools/cocci/zalloc.cocci -dir .
3*1031c584SApple OSS Distributions//
4*1031c584SApple OSS Distributions// This might need to be run several times
5*1031c584SApple OSS Distributions
6*1031c584SApple OSS Distributions@ using "zalloc.iso" @
7*1031c584SApple OSS Distributionsexpression D, E, F, G;
8*1031c584SApple OSS Distributionstype T;
9*1031c584SApple OSS Distributionsidentifier V;
10*1031c584SApple OSS Distributions@@
11*1031c584SApple OSS Distributions(
12*1031c584SApple OSS Distributions- kheap_alloc(KHEAP_DATA_BUFFERS, E, F)
13*1031c584SApple OSS Distributions+ kalloc_data(E, F)
14*1031c584SApple OSS Distributions|
15*1031c584SApple OSS Distributions- (T)kheap_alloc(KHEAP_DATA_BUFFERS, E, F)
16*1031c584SApple OSS Distributions+ (T)kalloc_data(E, F)
17*1031c584SApple OSS Distributions|
18*1031c584SApple OSS Distributions- kheap_alloc_tag(KHEAP_DATA_BUFFERS, E, F, G)
19*1031c584SApple OSS Distributions+ kalloc_data_tag(E, F, G)
20*1031c584SApple OSS Distributions|
21*1031c584SApple OSS Distributions- kheap_free(KHEAP_DATA_BUFFERS, E, F)
22*1031c584SApple OSS Distributions+ kfree_data(E, F)
23*1031c584SApple OSS Distributions|
24*1031c584SApple OSS Distributions- kheap_free_addr(KHEAP_DATA_BUFFERS, E)
25*1031c584SApple OSS Distributions+ kfree_data_addr(E)
26*1031c584SApple OSS Distributions)
27*1031c584SApple OSS Distributions
28*1031c584SApple OSS Distributions// vim:ft=diff:
29