git: 05cef7474215 - main - Adjust function definition in hwpmc to avoid clang 15 warning

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Thu, 11 Aug 2022 13:51:39 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=05cef74742154cf3c89be214a464d8fabddf8d7d

commit 05cef74742154cf3c89be214a464d8fabddf8d7d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-08-11 12:02:33 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-08-11 13:30:32 +0000

    Adjust function definition in hwpmc to avoid clang 15 warning
    
    With clang 15, the following -Werror warning is produced:
    
        sys/dev/hwpmc/hwpmc_arm64.c:530:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pmc_arm64_initialize()
                            ^
                             void
    
    This is because many of the functions are declared with a (void)
    argument list, but defined with an empty argument list. Make the
    definition match the declaration.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/dev/hwpmc/hwpmc_arm.c      | 2 +-
 sys/dev/hwpmc/hwpmc_arm64.c    | 2 +-
 sys/dev/hwpmc/hwpmc_arm64_md.c | 2 +-
 sys/dev/hwpmc/hwpmc_armv7.c    | 2 +-
 sys/dev/hwpmc/hwpmc_cmn600.c   | 4 ++--
 sys/dev/hwpmc/hwpmc_dmc620.c   | 2 +-
 sys/dev/hwpmc/hwpmc_powerpc.c  | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c
index 0e239f60eac0..c585a6cefd1e 100644
--- a/sys/dev/hwpmc/hwpmc_arm.c
+++ b/sys/dev/hwpmc/hwpmc_arm.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
 #endif
 
 struct pmc_mdep *
-pmc_md_initialize()
+pmc_md_initialize(void)
 {
 #ifdef CPU_CORTEXA
 	if (cpu_class == CPU_CLASS_CORTEXA)
diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c
index 9b530a7b2ddf..ca346f2ac4df 100644
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -527,7 +527,7 @@ arm64_pcpu_fini(struct pmc_mdep *md, int cpu)
 }
 
 struct pmc_mdep *
-pmc_arm64_initialize()
+pmc_arm64_initialize(void)
 {
 	struct pmc_mdep *pmc_mdep;
 	struct pmc_classdep *pcd;
diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c
index 4007b5840843..59d33ef34d06 100644
--- a/sys/dev/hwpmc/hwpmc_arm64_md.c
+++ b/sys/dev/hwpmc/hwpmc_arm64_md.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <vm/pmap.h>
 
 struct pmc_mdep *
-pmc_md_initialize()
+pmc_md_initialize(void)
 {
 
 	return (pmc_arm64_initialize());
diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c
index b742fa4c3110..1ba1dbb6e695 100644
--- a/sys/dev/hwpmc/hwpmc_armv7.c
+++ b/sys/dev/hwpmc/hwpmc_armv7.c
@@ -497,7 +497,7 @@ armv7_pcpu_fini(struct pmc_mdep *md, int cpu)
 }
 
 struct pmc_mdep *
-pmc_armv7_initialize()
+pmc_armv7_initialize(void)
 {
 	struct pmc_mdep *pmc_mdep;
 	struct pmc_classdep *pcd;
diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c
index 2e6ea41abff8..5e3ecb58c77c 100644
--- a/sys/dev/hwpmc/hwpmc_cmn600.c
+++ b/sys/dev/hwpmc/hwpmc_cmn600.c
@@ -711,7 +711,7 @@ cmn600_pmu_intr(struct trapframe *tf, int unit, int i)
  * Initialize ourselves.
  */
 static int
-cmn600_init_pmc_units()
+cmn600_init_pmc_units(void)
 {
 	int i;
 
@@ -732,7 +732,7 @@ cmn600_init_pmc_units()
 }
 
 int
-pmc_cmn600_nclasses()
+pmc_cmn600_nclasses(void)
 {
 
 	if (cmn600_pmc_nunits() > 0)
diff --git a/sys/dev/hwpmc/hwpmc_dmc620.c b/sys/dev/hwpmc/hwpmc_dmc620.c
index 653013e3f2ab..c340dbe69086 100644
--- a/sys/dev/hwpmc/hwpmc_dmc620.c
+++ b/sys/dev/hwpmc/hwpmc_dmc620.c
@@ -131,7 +131,7 @@ dmc620_pmc_unregister(int unit)
 }
 
 int
-pmc_dmc620_nclasses()
+pmc_dmc620_nclasses(void)
 {
 
 	if (dmc620_npmcs > 0)
diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c
index 86ec71f14e80..aeb7285ead2c 100644
--- a/sys/dev/hwpmc/hwpmc_powerpc.c
+++ b/sys/dev/hwpmc/hwpmc_powerpc.c
@@ -549,7 +549,7 @@ powerpc_pmc_intr(struct trapframe *tf)
 }
 
 struct pmc_mdep *
-pmc_md_initialize()
+pmc_md_initialize(void)
 {
 	struct pmc_mdep *pmc_mdep;
 	int error;