[Qemu-devel] [PATCH 7/8] Normalize header guard symbol definition.

Markus Armbruster posted 8 patches 6 years, 11 months ago
Maintainers: Max Filippov <jcmvbkbc@gmail.com>, Anthony Perard <anthony.perard@citrix.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Paolo Bonzini <pbonzini@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Marek Vasut <marex@denx.de>, Gerd Hoffmann <kraxel@redhat.com>, Li Zhijian <lizhijian@cn.fujitsu.com>, Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, Greg Kurz <groug@kaod.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Thomas Huth <thuth@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, John Snow <jsnow@redhat.com>, Richard Henderson <rth@twiddle.net>, Aleksandar Markovic <amarkovic@wavecomp.com>, Jan Kiszka <jan.kiszka@siemens.com>, Eric Auger <eric.auger@redhat.com>, Viktor Prutyanov <viktor.prutyanov@phystech.edu>, David Gibson <david@gibson.dropbear.id.au>, Alistair Francis <alistair@alistair23.me>, Riku Voipio <riku.voipio@iki.fi>, Peter Maydell <peter.maydell@linaro.org>, Laurent Vivier <laurent@vivier.eu>, Juan Quintela <quintela@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Max Reitz <mreitz@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Andrey Smirnov <andrew.smirnov@gmail.com>, Chris Wulff <crwulff@gmail.com>, Michael Roth <mdroth@linux.vnet.ibm.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Paul Durrant <paul.durrant@citrix.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Gonglei <arei.gonglei@huawei.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Stefano Stabellini <sstabellini@kernel.org>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Stefan Berger <stefanb@linux.ibm.com>, Laurent Vivier <lvivier@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Yuval Shaia <yuval.shaia@oracle.com>, Zhang Chen <zhangckid@gmail.com>, Aleksandar Rikalo <arikalo@wavecomp.com>, Fam Zheng <fam@euphon.net>, Palmer Dabbelt <palmer@sifive.com>, "Cédric Le Goater" <clg@kaod.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
[Qemu-devel] [PATCH 7/8] Normalize header guard symbol definition.
Posted by Markus Armbruster 6 years, 11 months ago
We commonly define the header guard symbol without an explicit value.
Normalize the exceptions.

Done with scripts/clean-header-guards.pl.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/timer/m48t59-internal.h    | 3 ++-
 include/disas/capstone.h      | 2 +-
 include/hw/scsi/emulation.h   | 2 +-
 include/qemu/stats64.h        | 2 +-
 include/qemu/sys_membarrier.h | 2 +-
 include/qemu/systemd.h        | 2 +-
 include/scsi/utils.h          | 2 +-
 include/ui/kbd-state.h        | 3 ++-
 scsi/pr-helper.h              | 3 ++-
 target/i386/hvf/x86.h         | 2 +-
 target/i386/hvf/x86_decode.h  | 2 +-
 target/i386/hvf/x86_descr.h   | 2 +-
 12 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/hw/timer/m48t59-internal.h b/hw/timer/m48t59-internal.h
index d0f0caf3c7..4d4f2a6fed 100644
--- a/hw/timer/m48t59-internal.h
+++ b/hw/timer/m48t59-internal.h
@@ -22,8 +22,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #ifndef HW_M48T59_INTERNAL_H
-#define HW_M48T59_INTERNAL_H 1
+#define HW_M48T59_INTERNAL_H
 
 #define M48T59_DEBUG 0
 
diff --git a/include/disas/capstone.h b/include/disas/capstone.h
index 84e214956d..e29068dd97 100644
--- a/include/disas/capstone.h
+++ b/include/disas/capstone.h
@@ -1,5 +1,5 @@
 #ifndef QEMU_CAPSTONE_H
-#define QEMU_CAPSTONE_H 1
+#define QEMU_CAPSTONE_H
 
 #ifdef CONFIG_CAPSTONE
 
diff --git a/include/hw/scsi/emulation.h b/include/hw/scsi/emulation.h
index 09fba1ff39..9521704326 100644
--- a/include/hw/scsi/emulation.h
+++ b/include/hw/scsi/emulation.h
@@ -1,5 +1,5 @@
 #ifndef HW_SCSI_EMULATION_H
-#define HW_SCSI_EMULATION_H 1
+#define HW_SCSI_EMULATION_H
 
 typedef struct SCSIBlockLimits {
     bool wsnz;
diff --git a/include/qemu/stats64.h b/include/qemu/stats64.h
index 4a357b3e9d..19a5ac4c56 100644
--- a/include/qemu/stats64.h
+++ b/include/qemu/stats64.h
@@ -10,7 +10,7 @@
  */
 
 #ifndef QEMU_STATS64_H
-#define QEMU_STATS64_H 1
+#define QEMU_STATS64_H
 
 #include "qemu/atomic.h"
 
diff --git a/include/qemu/sys_membarrier.h b/include/qemu/sys_membarrier.h
index 316e3dc4a2..b5bfa21d52 100644
--- a/include/qemu/sys_membarrier.h
+++ b/include/qemu/sys_membarrier.h
@@ -7,7 +7,7 @@
  */
 
 #ifndef QEMU_SYS_MEMBARRIER_H
-#define QEMU_SYS_MEMBARRIER_H 1
+#define QEMU_SYS_MEMBARRIER_H
 
 #ifdef CONFIG_MEMBARRIER
 /* Only block reordering at the compiler level in the performance-critical
diff --git a/include/qemu/systemd.h b/include/qemu/systemd.h
index e6a877e5c6..f0ea1266d5 100644
--- a/include/qemu/systemd.h
+++ b/include/qemu/systemd.h
@@ -11,7 +11,7 @@
  */
 
 #ifndef QEMU_SYSTEMD_H
-#define QEMU_SYSTEMD_H 1
+#define QEMU_SYSTEMD_H
 
 #define FIRST_SOCKET_ACTIVATION_FD 3 /* defined by systemd ABI */
 
diff --git a/include/scsi/utils.h b/include/scsi/utils.h
index 4b705f5e0f..9351b21ead 100644
--- a/include/scsi/utils.h
+++ b/include/scsi/utils.h
@@ -1,5 +1,5 @@
 #ifndef SCSI_UTILS_H
-#define SCSI_UTILS_H 1
+#define SCSI_UTILS_H
 
 #ifdef CONFIG_LINUX
 #include <scsi/sg.h>
diff --git a/include/ui/kbd-state.h b/include/ui/kbd-state.h
index d87833553a..eb9067dd53 100644
--- a/include/ui/kbd-state.h
+++ b/include/ui/kbd-state.h
@@ -3,8 +3,9 @@
  * (at your option) any later version.  See the COPYING file in the
  * top-level directory.
  */
+
 #ifndef QEMU_UI_KBD_STATE_H
-#define QEMU_UI_KBD_STATE_H 1
+#define QEMU_UI_KBD_STATE_H
 
 #include "qapi/qapi-types-ui.h"
 
diff --git a/scsi/pr-helper.h b/scsi/pr-helper.h
index 096d1f1df6..e26e104ec7 100644
--- a/scsi/pr-helper.h
+++ b/scsi/pr-helper.h
@@ -23,8 +23,9 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
  */
+
 #ifndef QEMU_PR_HELPER_H
-#define QEMU_PR_HELPER_H 1
+#define QEMU_PR_HELPER_H
 
 #define PR_HELPER_CDB_SIZE     16
 #define PR_HELPER_SENSE_SIZE   96
diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h
index 103ec0976c..c95d5b2116 100644
--- a/target/i386/hvf/x86.h
+++ b/target/i386/hvf/x86.h
@@ -17,7 +17,7 @@
  */
 
 #ifndef HVF_X86_H
-#define HVF_X86_H 1
+#define HVF_X86_H
 
 typedef struct x86_register {
     union {
diff --git a/target/i386/hvf/x86_decode.h b/target/i386/hvf/x86_decode.h
index ef4bcab310..bc574a7a44 100644
--- a/target/i386/hvf/x86_decode.h
+++ b/target/i386/hvf/x86_decode.h
@@ -16,7 +16,7 @@
  */
 
 #ifndef HVF_X86_DECODE_H
-#define HVF_X86_DECODE_H 1
+#define HVF_X86_DECODE_H
 
 #include "cpu.h"
 #include "x86.h"
diff --git a/target/i386/hvf/x86_descr.h b/target/i386/hvf/x86_descr.h
index 25a2b1731c..049ef9a417 100644
--- a/target/i386/hvf/x86_descr.h
+++ b/target/i386/hvf/x86_descr.h
@@ -17,7 +17,7 @@
  */
 
 #ifndef HVF_X86_DESCR_H
-#define HVF_X86_DESCR_H 1
+#define HVF_X86_DESCR_H
 
 #include "x86.h"
 
-- 
2.17.2


Re: [Qemu-devel] [PATCH 7/8] Normalize header guard symbol definition.
Posted by Philippe Mathieu-Daudé 6 years, 11 months ago
On 3/15/19 3:51 PM, Markus Armbruster wrote:
> We commonly define the header guard symbol without an explicit value.
> Normalize the exceptions.
> 
> Done with scripts/clean-header-guards.pl.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/timer/m48t59-internal.h    | 3 ++-
>  include/disas/capstone.h      | 2 +-
>  include/hw/scsi/emulation.h   | 2 +-
>  include/qemu/stats64.h        | 2 +-
>  include/qemu/sys_membarrier.h | 2 +-
>  include/qemu/systemd.h        | 2 +-
>  include/scsi/utils.h          | 2 +-
>  include/ui/kbd-state.h        | 3 ++-
>  scsi/pr-helper.h              | 3 ++-
>  target/i386/hvf/x86.h         | 2 +-
>  target/i386/hvf/x86_decode.h  | 2 +-
>  target/i386/hvf/x86_descr.h   | 2 +-
>  12 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/hw/timer/m48t59-internal.h b/hw/timer/m48t59-internal.h
> index d0f0caf3c7..4d4f2a6fed 100644
> --- a/hw/timer/m48t59-internal.h
> +++ b/hw/timer/m48t59-internal.h
> @@ -22,8 +22,9 @@
>   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>   * THE SOFTWARE.
>   */
> +
>  #ifndef HW_M48T59_INTERNAL_H
> -#define HW_M48T59_INTERNAL_H 1
> +#define HW_M48T59_INTERNAL_H
>  
>  #define M48T59_DEBUG 0
>  
> diff --git a/include/disas/capstone.h b/include/disas/capstone.h
> index 84e214956d..e29068dd97 100644
> --- a/include/disas/capstone.h
> +++ b/include/disas/capstone.h
> @@ -1,5 +1,5 @@
>  #ifndef QEMU_CAPSTONE_H
> -#define QEMU_CAPSTONE_H 1
> +#define QEMU_CAPSTONE_H
>  
>  #ifdef CONFIG_CAPSTONE
>  
> diff --git a/include/hw/scsi/emulation.h b/include/hw/scsi/emulation.h
> index 09fba1ff39..9521704326 100644
> --- a/include/hw/scsi/emulation.h
> +++ b/include/hw/scsi/emulation.h
> @@ -1,5 +1,5 @@
>  #ifndef HW_SCSI_EMULATION_H
> -#define HW_SCSI_EMULATION_H 1
> +#define HW_SCSI_EMULATION_H
>  
>  typedef struct SCSIBlockLimits {
>      bool wsnz;
> diff --git a/include/qemu/stats64.h b/include/qemu/stats64.h
> index 4a357b3e9d..19a5ac4c56 100644
> --- a/include/qemu/stats64.h
> +++ b/include/qemu/stats64.h
> @@ -10,7 +10,7 @@
>   */
>  
>  #ifndef QEMU_STATS64_H
> -#define QEMU_STATS64_H 1
> +#define QEMU_STATS64_H
>  
>  #include "qemu/atomic.h"
>  
> diff --git a/include/qemu/sys_membarrier.h b/include/qemu/sys_membarrier.h
> index 316e3dc4a2..b5bfa21d52 100644
> --- a/include/qemu/sys_membarrier.h
> +++ b/include/qemu/sys_membarrier.h
> @@ -7,7 +7,7 @@
>   */
>  
>  #ifndef QEMU_SYS_MEMBARRIER_H
> -#define QEMU_SYS_MEMBARRIER_H 1
> +#define QEMU_SYS_MEMBARRIER_H
>  
>  #ifdef CONFIG_MEMBARRIER
>  /* Only block reordering at the compiler level in the performance-critical
> diff --git a/include/qemu/systemd.h b/include/qemu/systemd.h
> index e6a877e5c6..f0ea1266d5 100644
> --- a/include/qemu/systemd.h
> +++ b/include/qemu/systemd.h
> @@ -11,7 +11,7 @@
>   */
>  
>  #ifndef QEMU_SYSTEMD_H
> -#define QEMU_SYSTEMD_H 1
> +#define QEMU_SYSTEMD_H
>  
>  #define FIRST_SOCKET_ACTIVATION_FD 3 /* defined by systemd ABI */
>  
> diff --git a/include/scsi/utils.h b/include/scsi/utils.h
> index 4b705f5e0f..9351b21ead 100644
> --- a/include/scsi/utils.h
> +++ b/include/scsi/utils.h
> @@ -1,5 +1,5 @@
>  #ifndef SCSI_UTILS_H
> -#define SCSI_UTILS_H 1
> +#define SCSI_UTILS_H
>  
>  #ifdef CONFIG_LINUX
>  #include <scsi/sg.h>
> diff --git a/include/ui/kbd-state.h b/include/ui/kbd-state.h
> index d87833553a..eb9067dd53 100644
> --- a/include/ui/kbd-state.h
> +++ b/include/ui/kbd-state.h
> @@ -3,8 +3,9 @@
>   * (at your option) any later version.  See the COPYING file in the
>   * top-level directory.
>   */
> +
>  #ifndef QEMU_UI_KBD_STATE_H
> -#define QEMU_UI_KBD_STATE_H 1
> +#define QEMU_UI_KBD_STATE_H
>  
>  #include "qapi/qapi-types-ui.h"
>  
> diff --git a/scsi/pr-helper.h b/scsi/pr-helper.h
> index 096d1f1df6..e26e104ec7 100644
> --- a/scsi/pr-helper.h
> +++ b/scsi/pr-helper.h
> @@ -23,8 +23,9 @@
>   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>   * IN THE SOFTWARE.
>   */
> +
>  #ifndef QEMU_PR_HELPER_H
> -#define QEMU_PR_HELPER_H 1
> +#define QEMU_PR_HELPER_H
>  
>  #define PR_HELPER_CDB_SIZE     16
>  #define PR_HELPER_SENSE_SIZE   96
> diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h
> index 103ec0976c..c95d5b2116 100644
> --- a/target/i386/hvf/x86.h
> +++ b/target/i386/hvf/x86.h
> @@ -17,7 +17,7 @@
>   */
>  
>  #ifndef HVF_X86_H
> -#define HVF_X86_H 1
> +#define HVF_X86_H
>  
>  typedef struct x86_register {
>      union {
> diff --git a/target/i386/hvf/x86_decode.h b/target/i386/hvf/x86_decode.h
> index ef4bcab310..bc574a7a44 100644
> --- a/target/i386/hvf/x86_decode.h
> +++ b/target/i386/hvf/x86_decode.h
> @@ -16,7 +16,7 @@
>   */
>  
>  #ifndef HVF_X86_DECODE_H
> -#define HVF_X86_DECODE_H 1
> +#define HVF_X86_DECODE_H
>  
>  #include "cpu.h"
>  #include "x86.h"
> diff --git a/target/i386/hvf/x86_descr.h b/target/i386/hvf/x86_descr.h
> index 25a2b1731c..049ef9a417 100644
> --- a/target/i386/hvf/x86_descr.h
> +++ b/target/i386/hvf/x86_descr.h
> @@ -17,7 +17,7 @@
>   */
>  
>  #ifndef HVF_X86_DESCR_H
> -#define HVF_X86_DESCR_H 1
> +#define HVF_X86_DESCR_H
>  
>  #include "x86.h"
>  
>