diff mbox series

[PULL,101/136] scripts/cocci: Rename memory-region-{init-ram -> housekeeping}

Message ID 1582631466-13880-101-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Paolo Bonzini Feb. 25, 2020, 11:50 a.m. UTC
From: Philippe Mathieu-Daudé <philmd@redhat.com>

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>
Message-Id: <20200224205533.23798-4-philmd@redhat.com>
Supersedes: <20200221173049.18134-1-philmd@redhat.com>
---
 MAINTAINERS                                                 |  1 +
 ...gion-init-ram.cocci => memory-region-housekeeping.cocci} | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 rename scripts/coccinelle/{memory-region-init-ram.cocci => memory-region-housekeeping.cocci} (84%)
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 195dd58..316a8ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1998,6 +1998,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>
diff --git a/scripts/coccinelle/memory-region-init-ram.cocci b/scripts/coccinelle/memory-region-housekeeping.cocci
similarity index 84%
rename from scripts/coccinelle/memory-region-init-ram.cocci
rename to scripts/coccinelle/memory-region-housekeeping.cocci
index d290150..3699c10 100644
--- a/scripts/coccinelle/memory-region-init-ram.cocci
+++ b/scripts/coccinelle/memory-region-housekeeping.cocci
@@ -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.