scripts/cocci: Rename memory-region-{init-ram -> housekeeping}

As we are going to add various semantic changes related to the memory
region API, rename this script to be more generic.
Add a 'usage' header, and an entry in MAINTAINERS to avoid checkpatch
warning.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-02-24 14:45:07 +01:00 committed by Paolo Bonzini
parent 83696c8f78
commit 044e2af9f5
2 changed files with 14 additions and 0 deletions

View File

@ -2047,6 +2047,7 @@ F: include/exec/ramblock.h
F: memory.c
F: include/exec/memory-internal.h
F: exec.c
F: scripts/coccinelle/memory-region-housekeeping.cocci
SPICE
M: Gerd Hoffmann <kraxel@redhat.com>

View File

@ -1,3 +1,16 @@
/*
Usage:
spatch \
--macro-file scripts/cocci-macro-file.h \
--sp-file scripts/coccinelle/memory-region-housekeeping.cocci \
--keep-comments \
--in-place \
--dir .
*/
// Replace by-hand memory_region_init_ram_nomigrate/vmstate_register_ram
// code sequences with use of the new memory_region_init_ram function.
// Similarly for the _rom and _rom_device functions.