git: 1570048c5219 - stable/13 - Adjust function definition in hwpmc to avoid clang 15 warning

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 22 Aug 2022 09:12:16 UTC
The branch stable/13 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=1570048c521991f30421038f9b17546ee338b5c5

commit 1570048c521991f30421038f9b17546ee338b5c5
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-08-11 12:02:33 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-08-22 09:11:29 +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
    
    (cherry picked from commit 05cef74742154cf3c89be214a464d8fabddf8d7d)
---
 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_powerpc.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c
index e9e4aef7ec01..ad13ade9bfa5 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 988cd1744a07..17d383133bf3 100644
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -521,7 +521,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 9037c4636b15..015bee227f89 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 090e4523102d..cd4761df46be 100644
--- a/sys/dev/hwpmc/hwpmc_armv7.c
+++ b/sys/dev/hwpmc/hwpmc_armv7.c
@@ -502,7 +502,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_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c
index aa18d2659d7d..7c6df5825399 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;