5 --macro-file scripts/cocci-macro-file.h \
6 --sp-file scripts/coccinelle/memory-region-housekeeping.cocci \
14 // Replace memory_region_init_ram(readonly) by memory_region_init_rom()
16 expression E1, E2, E3, E4, E5;
20 - memory_region_init_ram(E1, E2, E3, E4, E5);
21 + memory_region_init_rom(E1, E2, E3, E4, E5);
23 - memory_region_set_readonly(E1, true);
25 - memory_region_init_ram_nomigrate(E1, E2, E3, E4, E5);
26 + memory_region_init_rom_nomigrate(E1, E2, E3, E4, E5);
28 - memory_region_set_readonly(E1, true);
32 // Replace by-hand memory_region_init_ram_nomigrate/vmstate_register_ram
33 // code sequences with use of the new memory_region_init_ram function.
34 // Similarly for the _rom and _rom_device functions.
35 // We don't try to replace sequences with a non-NULL owner, because
36 // there are none in the tree that can be automatically converted
37 // (and only a handful that can be manually converted).
44 -memory_region_init_ram_nomigrate(MR, NULL, NAME, SIZE, ERRP);
45 +memory_region_init_ram(MR, NULL, NAME, SIZE, ERRP);
47 -vmstate_register_ram_global(MR);
54 -memory_region_init_rom_nomigrate(MR, NULL, NAME, SIZE, ERRP);
55 +memory_region_init_rom(MR, NULL, NAME, SIZE, ERRP);
57 -vmstate_register_ram_global(MR);
66 -memory_region_init_rom_device_nomigrate(MR, NULL, OPS, OPAQUE, NAME, SIZE, ERRP);
67 +memory_region_init_rom_device(MR, NULL, OPS, OPAQUE, NAME, SIZE, ERRP);
69 -vmstate_register_ram_global(MR);