lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d2b3a6785d3e80069fea85921c72cf0b7afb8493.1694613528.git.geert@linux-m68k.org>
Date:   Wed, 13 Sep 2023 16:08:14 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     linux-m68k@...ts.linux-m68k.org
Cc:     Arnd Bergmann <arnd@...db.de>, Finn Thain <fthain@...ux-m68k.org>,
        Michael Schmitz <schmitzmic@...il.com>,
        Philip Blundell <philb@....org>,
        Greg Ungerer <gerg@...ux-m68k.org>,
        Joshua Thompson <funaho@...ai.org>,
        Sam Creasey <sammy@...my.net>,
        Laurent Vivier <laurent@...ier.eu>,
        linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH v2 24/52] m68k: apollo: Make local reset, serial, and irq functions static

When building with W=1:

    arch/m68k/apollo/config.c:132:6: warning: no previous prototype for ‘dn_serial_print’ [-Wmissing-prototypes]
      110 | void dn_serial_print (const char *str)
	  |      ^~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:8:14: warning: no previous prototype for ‘apollo_irq_startup’ [-Wmissing-prototypes]
	8 | unsigned int apollo_irq_startup(struct irq_data *data)
	  |              ^~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:19:6: warning: no previous prototype for ‘apollo_irq_shutdown’ [-Wmissing-prototypes]
       19 | void apollo_irq_shutdown(struct irq_data *data)
	  |      ^~~~~~~~~~~~~~~~~~~
    arch/m68k/apollo/dn_ints.c:29:6: warning: no previous prototype for ‘apollo_irq_eoi’ [-Wmissing-prototypes]
       29 | void apollo_irq_eoi(struct irq_data *data)
	  |      ^~~~~~~~~~~~~~

Fix this by making all local functions static.

Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Acked-by: Arnd Bergmann <arnd@...db.de>
---
v2:
  - Add Acked-by.
---
 arch/m68k/apollo/config.c  | 8 ++++----
 arch/m68k/apollo/dn_ints.c | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index fccbb40772dca6b9..0e6801eecbaf6361 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -29,7 +29,7 @@ u_long apollo_model;
 extern void dn_sched_init(void);
 extern void dn_init_IRQ(void);
 extern int dn_dummy_hwclk(int, struct rtc_time *);
-extern void dn_dummy_reset(void);
+static void dn_dummy_reset(void);
 #ifdef CONFIG_HEARTBEAT
 static void dn_heartbeat(int on);
 #endif
@@ -107,7 +107,7 @@ static void __init dn_setup_model(void)
 
 }
 
-void dn_serial_print (const char *str)
+static void dn_serial_print(const char *str)
 {
     while (*str) {
         if (*str == '\n') {
@@ -207,8 +207,8 @@ int dn_dummy_hwclk(int op, struct rtc_time *t) {
 
 }
 
-void dn_dummy_reset(void) {
-
+static void dn_dummy_reset(void)
+{
   dn_serial_print("The end !\n");
 
   for(;;);
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 02cff7efc8342aa6..d97251fe0ab83045 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -5,7 +5,7 @@
 #include <asm/traps.h>
 #include <asm/apollohw.h>
 
-unsigned int apollo_irq_startup(struct irq_data *data)
+static unsigned int apollo_irq_startup(struct irq_data *data)
 {
 	unsigned int irq = data->irq;
 
@@ -16,7 +16,7 @@ unsigned int apollo_irq_startup(struct irq_data *data)
 	return 0;
 }
 
-void apollo_irq_shutdown(struct irq_data *data)
+static void apollo_irq_shutdown(struct irq_data *data)
 {
 	unsigned int irq = data->irq;
 
@@ -26,7 +26,7 @@ void apollo_irq_shutdown(struct irq_data *data)
 		*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
 }
 
-void apollo_irq_eoi(struct irq_data *data)
+static void apollo_irq_eoi(struct irq_data *data)
 {
 	*(volatile unsigned char *)(pica) = 0x20;
 	*(volatile unsigned char *)(picb) = 0x20;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ