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