mark <zlib.h> with for-crc32 in a consistent manner
authorMichael Tokarev <mjt@tls.msk.ru>
Tue, 27 Aug 2024 10:01:47 +0000 (13:01 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 20 Sep 2024 05:06:56 +0000 (08:06 +0300)
in many cases, <zlib.h> is only included for crc32 function,
and in some of them, there's a comment saying that, but in
a different way.  In one place (hw/net/rtl8139.c), there was
another #include added between the comment and <zlib.h> include.

Make all such comments to be on the same line as #include, make
it consistent, and also add a few missing comments, including
hw/nvram/mac_nvram.c which uses adler32 instead.

There's no code changes.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
15 files changed:
hw/net/cadence_gem.c
hw/net/dp8393x.c
hw/net/ftgmac100.c
hw/net/i82596.c
hw/net/imx_fec.c
hw/net/lan9118.c
hw/net/mcf_fec.c
hw/net/npcm7xx_emc.c
hw/net/rtl8139.c
hw/net/smc91c111.c
hw/net/stellaris_enet.c
hw/nvram/mac_nvram.c
target/arm/helper.c
target/arm/tcg/helper-a64.c
target/loongarch/tcg/op_helper.c

index 44a5e65b8ff90cefa29c17a7eef3f94b92cac6fc..526739887c23f0159a14ab58fc41be96202946ba 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "qemu/osdep.h"
-#include <zlib.h> /* For crc32 */
+#include <zlib.h> /* for crc32 */
 
 #include "hw/irq.h"
 #include "hw/net/cadence_gem.h"
index 09d708f989db4dfa70005ba5f4717ef0cf37ab5a..c0977308ba992fd6e3cf016f8c7de2e75adcbba4 100644 (file)
@@ -27,7 +27,7 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 #include "qom/object.h"
 #include "trace.h"
 
index 178a11675d58f457af4b6c93209fed2774753a2e..478356ee3e108ab89228bd5e2fa273b8b3270665 100644 (file)
@@ -24,8 +24,7 @@
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
 
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 
 /*
  * FTGMAC100 registers
index 6cc8292a65ad2894995ca9e249d26f9ed0cd2161..d786086a5188be21cdd3198914b8493e22e2dd44 100644 (file)
@@ -19,7 +19,7 @@
 #include "qemu/module.h"
 #include "trace.h"
 #include "i82596.h"
-#include <zlib.h>       /* For crc32 */
+#include <zlib.h> /* for crc32 */
 
 #if defined(ENABLE_DEBUG)
 #define DBG(x)          x
index f9265de18b03411addf6d10be53d41717beb8a34..6294d292023b960d2b0b3c98898eecd06dcab97e 100644 (file)
@@ -33,8 +33,7 @@
 #include "net/eth.h"
 #include "trace.h"
 
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 
 #define IMX_MAX_DESC    1024
 
index 5a49601497c7011bf85e76264c7600c9b6808c55..db28a0ef306cc60a4074a641fba476b91562c80e 100644 (file)
@@ -22,8 +22,7 @@
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 #include "qom/object.h"
 
 //#define DEBUG_LAN9118
index 2898ad22d8f1881ae84435fff6c35ddf0641004f..037cd2028ea6b54831a68857ee3c91dd47cf6cce 100644 (file)
@@ -16,8 +16,7 @@
 #include "hw/net/mii.h"
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 
 //#define DEBUG_FEC 1
 
index 31e488d138e7969816c7f3a4fc27feda8503bd98..7307a134006854bb9fdaf6ba2b752e26f13270ae 100644 (file)
@@ -29,8 +29,7 @@
 
 #include "qemu/osdep.h"
 
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 
 #include "hw/irq.h"
 #include "hw/qdev-clock.h"
index 1b78deb14c40a2d1b5381aafd0d42e02ca143563..bc56075c0dd15ac4d82d43fee4aa0773723e3923 100644 (file)
  *  2011-Mar-22  Benjamin Poirier:  Implemented VLAN offloading
  */
 
-/* For crc32 */
-
 #include "qemu/osdep.h"
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 
 #include "hw/pci/pci_device.h"
 #include "hw/qdev-properties.h"
index c5338dd49e8d4feb7992a7aa97f33f25edbe09b2..180ba5c7912c546bfb82cfb45d87f425bb072035 100644 (file)
@@ -17,8 +17,7 @@
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-/* For crc32 */
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 #include "qom/object.h"
 
 /* Number of 2k memory pages available.  */
index 08e5393151692685cc8590ef9dadea8866a5a5ee..9ebff296c41f115e55aea5625472b53d7cf8b001 100644 (file)
@@ -15,7 +15,7 @@
 #include "net/net.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 #include "qom/object.h"
 
 //#define DEBUG_STELLARIS_ENET 1
index fef34e7f412b4231c8bb0b8fc320c7a5cc2d5d3f..e47e52a6773f1c1991b36bb34d76dc0b9d2da94b 100644 (file)
@@ -35,7 +35,7 @@
 #include "qemu/module.h"
 #include "qemu/error-report.h"
 #include "trace.h"
-#include <zlib.h>
+#include <zlib.h> /* for adler32 */
 
 #define DEF_SYSTEM_SIZE 0xc10
 
index 0a582c1cd3b346c82e9b12802f6a94a50a5f85c9..3f77b40734f2db831254a0e4eb205751aec0d1e5 100644 (file)
@@ -19,7 +19,7 @@
 #include "qemu/crc32c.h"
 #include "qemu/qemu-print.h"
 #include "exec/exec-all.h"
-#include <zlib.h> /* For crc32 */
+#include <zlib.h> /* for crc32 */
 #include "hw/irq.h"
 #include "sysemu/cpu-timers.h"
 #include "sysemu/kvm.h"
index 21a9abd90a6214e1f7a59f665cbef87318327122..56b431faf57f4809cac09692d18ec312b4b85113 100644 (file)
@@ -33,7 +33,7 @@
 #include "qemu/int128.h"
 #include "qemu/atomic128.h"
 #include "fpu/softfloat.h"
-#include <zlib.h> /* For crc32 */
+#include <zlib.h> /* for crc32 */
 
 /* C2.4.7 Multiply and divide */
 /* special cases for 0 and LLONG_MIN are mandated by the standard */
index fe79c62fa472bf23b48ca8c1c3eb6b926b7434b4..b17208e5b962f2191b2afa60181bff311d618bba 100644 (file)
@@ -14,7 +14,7 @@
 #include "exec/cpu_ldst.h"
 #include "internals.h"
 #include "qemu/crc32c.h"
-#include <zlib.h>
+#include <zlib.h> /* for crc32 */
 #include "cpu-csr.h"
 
 /* Exceptions helpers */