Use #include "..." for our own headers, <...> for others
authorMarkus Armbruster <armbru@redhat.com>
Thu, 1 Feb 2018 11:18:28 +0000 (12:18 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 9 Feb 2018 04:05:11 +0000 (05:05 +0100)
System headers should be included with <...>, our own headers with
"...".  Offenders tracked down with an ugly, brittle and probably
buggy Perl script.  Previous iteration was commit a9c94277f0.

Delete inclusions of "string.h" and "strings.h" instead of fixing them
to <string.h> and <strings.h>, because we always include these via
osdep.h.

Put the cleaned up system header includes first.

While there, separate #include from file comment with exactly one
blank line.

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180201111846.21846-2-armbru@redhat.com>

19 files changed:
contrib/vhost-user-scsi/vhost-user-scsi.c
hw/ide/sii3112.c
hw/s390x/s390-ccw.c
include/hw/loader-fit.h
include/hw/registerfields.h
include/hw/s390x/storage-attributes.h
target/i386/hax-all.c
target/i386/hvf/hvf.c
target/i386/hvf/x86_decode.c
target/i386/hvf/x86_mmu.c
target/i386/hvf/x86_task.c
target/s390x/gen-features.c
target/xtensa/core-dc232b/xtensa-modules.c
target/xtensa/core-dc233c/xtensa-modules.c
target/xtensa/core-de212/xtensa-modules.c
target/xtensa/core-fsf/xtensa-modules.c
target/xtensa/core-sample_controller/xtensa-modules.c
target/xtensa/xtensa-isa.h
vl.c

index 54c1191db0f6a32460cea4966206bcb5866cf136..02c29019d17c6dd0fcb797057a4d1b1c2ed4fdd0 100644 (file)
  */
 
 #include "qemu/osdep.h"
+#include <iscsi/iscsi.h>
+#include <iscsi/scsi-lowlevel.h>
 #include "contrib/libvhost-user/libvhost-user-glib.h"
 #include "standard-headers/linux/virtio_scsi.h"
-#include "iscsi/iscsi.h"
-#include "iscsi/scsi-lowlevel.h"
 
 #include <glib.h>
 
index 17aa930e39fb0a5c23854b5562385f9b6aedc48f..e3896c65b452af282e4db4cb64655c681b398597 100644 (file)
@@ -12,8 +12,8 @@
  * http://wiki.osdev.org/User:Quok/Silicon_Image_Datasheets
  */
 
-#include <qemu/osdep.h>
-#include <hw/ide/pci.h>
+#include "qemu/osdep.h"
+#include "hw/ide/pci.h"
 #include "trace.h"
 
 #define TYPE_SII3112_PCI "sii3112"
index 4a9d4d2534d9454b12d08bae1869b714154eb289..7fc1c603c07146a48376e24fd994da282be554e2 100644 (file)
  * or (at your option) any later version. See the COPYING file in the
  * top-level directory.
  */
+
 #include "qemu/osdep.h"
+#include <libgen.h>
 #include "qapi/error.h"
 #include "hw/sysbus.h"
-#include "libgen.h"
 #include "hw/s390x/css.h"
 #include "hw/s390x/css-bridge.h"
 #include "hw/s390x/s390-ccw.h"
index 9e2a068a20964d43ea5f8ade488d6226ab9ad1ed..0284c3e02ce7226675429c0801a4aaca2832842e 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef HW_LOADER_FIT_H
 #define HW_LOADER_FIT_H
 
-#include <exec/hwaddr.h>
+#include "exec/hwaddr.h"
 
 struct fit_loader_match {
     const char *compatible;
index 44e0b94edf0fb439babb37a1d4589e024a1e7d4b..2659a587372bbe39395c5301b262d62f86dd3755 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef REGISTERFIELDS_H
 #define REGISTERFIELDS_H
 
-#include <qemu/bitops.h>
+#include "qemu/bitops.h"
 
 /* Define constants for a 32 bit register */
 
index 9be954d163ce680c365c33f0ddf6f9021f91fbee..d6403a0a7eda212faac5f0613421487a4ff37f64 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef S390_STORAGE_ATTRIBUTES_H
 #define S390_STORAGE_ATTRIBUTES_H
 
-#include <hw/qdev.h>
+#include "hw/qdev.h"
 #include "monitor/monitor.h"
 
 #define TYPE_S390_STATTRIB "s390-storage_attributes"
index 934ec4afd1408e34adf7d756d48b889fe1cd16e4..bc9a12c1ee023f7f4be4a4c0e1366a6722aa7160 100644 (file)
@@ -30,7 +30,6 @@
 #include "exec/ioport.h"
 
 #include "qemu-common.h"
-#include "strings.h"
 #include "hax-i386.h"
 #include "sysemu/accel.h"
 #include "sysemu/sysemu.h"
index 85e596436514250d6aec3f1646c5324b09ecb791..15870a4f36695cdf8de581afe05009a30209de11 100644 (file)
@@ -70,7 +70,6 @@
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
-#include "strings.h"
 #include "sysemu/accel.h"
 #include "sysemu/sysemu.h"
 #include "target/i386/cpu.h"
index bf93e8207d4c0e648b9202bbca0e6b7e5fb333ee..2d7540fe7c7505acc984c011a81f4a2ece62a4bf 100644 (file)
@@ -21,7 +21,6 @@
 #include "qemu-common.h"
 #include "panic.h"
 #include "x86_decode.h"
-#include "string.h"
 #include "vmx.h"
 #include "x86_mmu.h"
 #include "x86_descr.h"
index 5c1f35acd067c39212d7f444c1c096164af69915..c6be2cca357491bd4f4b9f064d8bb1cf35a736d1 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
+#include <memory.h>
 #include "panic.h"
-
 #include "qemu-common.h"
 #include "cpu.h"
 #include "x86.h"
 #include "x86_mmu.h"
-#include "string.h"
 #include "vmcs.h"
 #include "vmx.h"
-
-#include "memory.h"
 #include "exec/address-spaces.h"
 
 #define pte_present(pte) (pte & PT_PRESENT)
index d7f665f8fa1909f5a2b1e878c1eee269c00aa068..4abf3db25e9ce45d077b72c91ffc02be419e7961 100644 (file)
@@ -32,7 +32,6 @@
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
 #include "qemu/main-loop.h"
-#include "strings.h"
 #include "sysemu/accel.h"
 #include "sysemu/sysemu.h"
 #include "target/i386/cpu.h"
index 0570f597ec9f448d87daa0d617776096b392c491..bd483333aebd1535af00e9831e47b0ca98e541c5 100644 (file)
@@ -9,12 +9,10 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or (at
  * your option) any later version. See the COPYING file in the top-level
  * directory.
- *
  */
 
-
-#include "inttypes.h"
-#include "stdio.h"
+#include <inttypes.h>
+#include <stdio.h>
 #include "cpu_features_def.h"
 
 #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
index 2e103cd2f531cd0de048624573d14f66e1fe4ca0..0af43c84bbf4f4374794f36667c0edf241417aa7 100644 (file)
@@ -18,7 +18,7 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include <xtensa-isa.h>
+#include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
 \f
index 2728311c9adb6eeba4d4d095a5b38f5af101ac05..8a41e7365901f1802e796cbf8643aeda7366385a 100644 (file)
@@ -21,7 +21,7 @@
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
-#include <xtensa-isa.h>
+#include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
 \f
index 4a8735889e197532b33f7126c5383c467f401451..21f3bd87973c0852c76dd0ca17a04f50c6ccb327 100644 (file)
@@ -21,7 +21,7 @@
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
-#include <xtensa-isa.h>
+#include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
 \f
index 238800d823a39229e58e727ad2fa0b2d6ea086e9..9621f5142a9a5d27655a42d560d9dcb7b2af41c1 100644 (file)
@@ -18,7 +18,7 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include <xtensa-isa.h>
+#include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
 \f
index 2f000199b8cd31705e0f4bcc510a83e6ad2d9e95..39810e532aada3537c842f5b0c60d7fe88e0c68c 100644 (file)
@@ -21,7 +21,7 @@
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
-#include <xtensa-isa.h>
+#include "xtensa-isa.h"
 #include "xtensa-isa-internal.h"
 
 \f
index d06614c187c1029b3e01bbf1cc6f8677a37dc474..0f0211f841aec679fe195adb116920a34ed69ed7 100644 (file)
@@ -1 +1 @@
-#include <hw/xtensa/xtensa-isa.h>
+#include "hw/xtensa/xtensa-isa.h"
diff --git a/vl.c b/vl.c
index 32db91da1e5237baafe9ec9ae6fd58525bc1c89c..e4c24213535ce4e96d4b8d5972a8d25be3efb627 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -28,8 +28,8 @@
 #include "qemu/uuid.h"
 
 #ifdef CONFIG_SECCOMP
+#include <sys/prctl.h>
 #include "sysemu/seccomp.h"
-#include "sys/prctl.h"
 #endif
 
 #ifdef CONFIG_SDL