1*220c9d77SFrançois Tigeot// Transform Linux kmalloc and krealloc calls by DragonFly-compatible versions
2*220c9d77SFrançois Tigeot// Usage: spatch --no-includes --sp-file scripts/linux_kmalloc.cocci --in-place <files>
3*220c9d77SFrançois Tigeot
4*220c9d77SFrançois Tigeot@@
5*220c9d77SFrançois Tigeotexpression E1, E2, E3, E4;
6*220c9d77SFrançois Tigeot@@
7*220c9d77SFrançois Tigeot
8*220c9d77SFrançois Tigeot(
9*220c9d77SFrançois Tigeot- E1 = kmalloc(E2, E3);
10*220c9d77SFrançois Tigeot+ E1 = kmalloc(E2, M_DRM, E3);
11*220c9d77SFrançois Tigeot|
12*220c9d77SFrançois Tigeot- E1 = krealloc(E2, E3, E4);
13*220c9d77SFrançois Tigeot+ E1 = krealloc(E2, E3, M_DRM, E4);
14*220c9d77SFrançois Tigeot)
15