* [PATCH 1/8] openrisc: Add missing prototypes for assembly called fnctions
[not found] <20230821072007.2698186-1-shorne@gmail.com>
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 2/8] openrisc: Declare do_signal function as static Stafford Horne
` (6 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Oleg Nesterov, Jonas Bonn,
Stefan Kristiansson, Guo Ren, Palmer Dabbelt,
Peter Zijlstra (Intel), Valentin Schneider, Al Viro,
linux-openrisc
These functions are all called from assembly files so there is no need
for a prototype in a header file, but when compiling with W=1 enabling
-Wmissing-prototypes the compiler warns:
arch/openrisc/kernel/ptrace.c:191:17: error: no previous prototype for 'do_syscall_trace_enter' [-Werror=missing-prototypes]
arch/openrisc/kernel/ptrace.c:210:17: error: no previous prototype for 'do_syscall_trace_leave' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:293:1: error: no previous prototype for 'do_work_pending' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:68:17: error: no previous prototype for '_sys_rt_sigreturn' [-Werror=missing-prototypes]
arch/openrisc/kernel/time.c:111:25: error: no previous prototype for 'timer_interrupt' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:239:17: error: no previous prototype for 'unhandled_exception' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:246:17: error: no previous prototype for 'do_fpe_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:268:17: error: no previous prototype for 'do_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:273:17: error: no previous prototype for 'do_unaligned_access' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:286:17: error: no previous prototype for 'do_bus_fault' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:462:17: error: no previous prototype for 'do_illegal_instruction' [-Werror=missing-prototypes]
arch/openrisc/mm/fault.c:44:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
Since these are not needed in header files, fix these by adding
prototypes to the top of the respective C files.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/kernel/ptrace.c | 4 ++++
arch/openrisc/kernel/signal.c | 5 +++++
arch/openrisc/kernel/smp.c | 2 ++
arch/openrisc/kernel/time.c | 2 ++
arch/openrisc/kernel/traps.c | 8 ++++++++
arch/openrisc/mm/fault.c | 3 +++
6 files changed, 24 insertions(+)
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
index 0b7d2ca6ba3b..1eeac3b62e9d 100644
--- a/arch/openrisc/kernel/ptrace.c
+++ b/arch/openrisc/kernel/ptrace.c
@@ -27,6 +27,10 @@
#include <asm/thread_info.h>
#include <asm/page.h>
+asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
+
+asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
+
/*
* Copy the thread state to a regset that can be interpreted by userspace.
*
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
index 2e7257a433ff..3fbf00330043 100644
--- a/arch/openrisc/kernel/signal.c
+++ b/arch/openrisc/kernel/signal.c
@@ -34,6 +34,11 @@ struct rt_sigframe {
unsigned char retcode[16]; /* trampoline code */
};
+asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs);
+
+asmlinkage int do_work_pending(struct pt_regs *regs, unsigned int thread_flags,
+ int syscall);
+
static int restore_sigcontext(struct pt_regs *regs,
struct sigcontext __user *sc)
{
diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c
index 0a7a059e2dff..1c5a2d71d675 100644
--- a/arch/openrisc/kernel/smp.c
+++ b/arch/openrisc/kernel/smp.c
@@ -23,6 +23,8 @@
#include <asm/cacheflush.h>
#include <asm/time.h>
+asmlinkage __init void secondary_start_kernel(void);
+
static void (*smp_cross_call)(const struct cpumask *, unsigned int);
unsigned long secondary_release = -1;
diff --git a/arch/openrisc/kernel/time.c b/arch/openrisc/kernel/time.c
index 8e26c1af5441..764c7bfb5df3 100644
--- a/arch/openrisc/kernel/time.c
+++ b/arch/openrisc/kernel/time.c
@@ -25,6 +25,8 @@
#include <asm/cpuinfo.h>
#include <asm/time.h>
+irqreturn_t __irq_entry timer_interrupt(struct pt_regs *regs);
+
/* Test the timer ticks to count, used in sync routine */
inline void openrisc_timer_set(unsigned long count)
{
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index 0aa6b07efda1..afa47501118f 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -38,6 +38,14 @@ static int kstack_depth_to_print = 0x180;
int lwa_flag;
static unsigned long __user *lwa_addr;
+asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vector);
+asmlinkage void do_trap(struct pt_regs *regs, unsigned long address);
+asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address);
+asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address);
+asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address);
+asmlinkage void do_illegal_instruction(struct pt_regs *regs,
+ unsigned long address);
+
static void print_trace(void *data, unsigned long addr, int reliable)
{
const char *loglvl = data;
diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index a9dcd4381d1a..01dc18aa8410 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -32,6 +32,9 @@ volatile pgd_t *current_pgd[NR_CPUS];
extern void __noreturn die(char *, struct pt_regs *, long);
+asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
+ unsigned long vector, int write_acc);
+
/*
* This routine handles page faults. It determines the address,
* and the problem, and then passes it off to one of the appropriate
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/8] openrisc: Declare do_signal function as static
[not found] <20230821072007.2698186-1-shorne@gmail.com>
2023-08-21 7:20 ` [PATCH 1/8] openrisc: Add missing prototypes for assembly called fnctions Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 3/8] openrisc: Add prototype for show_registers to processor.h Stafford Horne
` (5 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/kernel/signal.c:227:5: error: no previous prototype for 'do_signal' [-Werror=missing-prototypes]
Fix this by declaring the function a static as it is not used outside of
the scope of this file.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/kernel/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c
index 3fbf00330043..e2f21a5d8ad9 100644
--- a/arch/openrisc/kernel/signal.c
+++ b/arch/openrisc/kernel/signal.c
@@ -229,7 +229,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)
* mode below.
*/
-int do_signal(struct pt_regs *regs, int syscall)
+static int do_signal(struct pt_regs *regs, int syscall)
{
struct ksignal ksig;
unsigned long continue_addr = 0;
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/8] openrisc: Add prototype for show_registers to processor.h
[not found] <20230821072007.2698186-1-shorne@gmail.com>
2023-08-21 7:20 ` [PATCH 1/8] openrisc: Add missing prototypes for assembly called fnctions Stafford Horne
2023-08-21 7:20 ` [PATCH 2/8] openrisc: Declare do_signal function as static Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 4/8] openrisc: Add prototype for die to bug.h Stafford Horne
` (4 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
Geert Uytterhoeven, Michael Ellerman, Catalin Marinas, Guo Ren,
Kefeng Wang, Frederic Weisbecker, Gautham R. Shenoy,
Peter Zijlstra, linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/kernel/traps.c:67:6: error: no previous prototype for 'show_registers' [-Werror=missing-prototypes]
Fix by adding the prototype to the appropriate header file and including
the header file in the appropriate C files.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/include/asm/processor.h | 1 +
arch/openrisc/kernel/process.c | 2 --
arch/openrisc/kernel/traps.c | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h
index ed9efb430afa..3b736e74e6ed 100644
--- a/arch/openrisc/include/asm/processor.h
+++ b/arch/openrisc/include/asm/processor.h
@@ -73,6 +73,7 @@ struct thread_struct {
void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
unsigned long __get_wchan(struct task_struct *p);
+void show_registers(struct pt_regs *regs);
#define cpu_relax() barrier()
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index dfa558f98ed8..a07512de0169 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -119,8 +119,6 @@ void flush_thread(void)
void show_regs(struct pt_regs *regs)
{
- extern void show_registers(struct pt_regs *regs);
-
show_regs_print_info(KERN_DEFAULT);
/* __PHX__ cleanup this mess */
show_registers(regs);
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index afa47501118f..f221e4b4298f 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -31,6 +31,7 @@
#include <linux/uaccess.h>
#include <asm/io.h>
+#include <asm/processor.h>
#include <asm/unwinder.h>
#include <asm/sections.h>
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/8] openrisc: Add prototype for die to bug.h
[not found] <20230821072007.2698186-1-shorne@gmail.com>
` (2 preceding siblings ...)
2023-08-21 7:20 ` [PATCH 3/8] openrisc: Add prototype for show_registers to processor.h Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 5/8] openrisc: Include cpu.h and switch_to.h for prototypes Stafford Horne
` (3 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
Al Viro, linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/kernel/traps.c:221:17: sing-prototypesrror: no previous prototype for 'die' [-Werror=missing-prototypes]
Fix by adding the prototype to the appropriate header file and including
the header file in the appropriate C files.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/include/asm/bug.h | 11 +++++++++++
arch/openrisc/kernel/traps.c | 1 +
arch/openrisc/mm/fault.c | 3 +--
3 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 arch/openrisc/include/asm/bug.h
diff --git a/arch/openrisc/include/asm/bug.h b/arch/openrisc/include/asm/bug.h
new file mode 100644
index 000000000000..6d04776eaf10
--- /dev/null
+++ b/arch/openrisc/include/asm/bug.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __ASM_OPENRISC_BUG_H
+#define __ASM_OPENRISC_BUG_H
+
+#include <asm-generic/bug.h>
+
+struct pt_regs;
+
+void __noreturn die(const char *str, struct pt_regs *regs, long err);
+
+#endif /* __ASM_OPENRISC_BUG_H */
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index f221e4b4298f..879fbf57c04e 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -30,6 +30,7 @@
#include <linux/kallsyms.h>
#include <linux/uaccess.h>
+#include <asm/bug.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/unwinder.h>
diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c
index 01dc18aa8410..29e232d78d82 100644
--- a/arch/openrisc/mm/fault.c
+++ b/arch/openrisc/mm/fault.c
@@ -18,6 +18,7 @@
#include <linux/perf_event.h>
#include <linux/uaccess.h>
+#include <asm/bug.h>
#include <asm/mmu_context.h>
#include <asm/siginfo.h>
#include <asm/signal.h>
@@ -30,8 +31,6 @@
*/
volatile pgd_t *current_pgd[NR_CPUS];
-extern void __noreturn die(char *, struct pt_regs *, long);
-
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long vector, int write_acc);
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/8] openrisc: Include cpu.h and switch_to.h for prototypes
[not found] <20230821072007.2698186-1-shorne@gmail.com>
` (3 preceding siblings ...)
2023-08-21 7:20 ` [PATCH 4/8] openrisc: Add prototype for die to bug.h Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 6/8] openriac: Remove unused nommu_dump_state function Stafford Horne
` (2 subsequent siblings)
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
Guo Ren, Kefeng Wang, Frederic Weisbecker, Gautham R. Shenoy,
Peter Zijlstra, linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/kernel/process.c:100:6: error: no previous prototype for 'arch_cpu_idle' [-Werror=missing-prototypes]
arch/openrisc/kernel/process.c:240:21: error: no previous prototype for '__switch_to' [-Werror=missing-prototypes]
Fix these by adding the approrpiate header files to process.c which
brings in the prototype definitions.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/kernel/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index a07512de0169..86e02929f3ac 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -14,6 +14,7 @@
*/
#define __KERNEL_SYSCALLS__
+#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
@@ -38,6 +39,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/spr_defs.h>
+#include <asm/switch_to.h>
#include <linux/smp.h>
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/8] openriac: Remove unused nommu_dump_state function
[not found] <20230821072007.2698186-1-shorne@gmail.com>
` (4 preceding siblings ...)
2023-08-21 7:20 ` [PATCH 5/8] openrisc: Include cpu.h and switch_to.h for prototypes Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 7/8] openrisc: Remove unused tlb_init function Stafford Horne
2023-08-21 7:20 ` [PATCH 8/8] openrisc: Remove kernel-doc marker from ioremap comment Stafford Horne
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/kernel/traps.c:146:6: error: no previous prototype for 'nommu_dump_state' [-Werror=missing-prototypes]
This function is not used so remove it.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/kernel/traps.c | 75 ------------------------------------
1 file changed, 75 deletions(-)
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index 879fbf57c04e..9370888c9a7e 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -36,7 +36,6 @@
#include <asm/unwinder.h>
#include <asm/sections.h>
-static int kstack_depth_to_print = 0x180;
int lwa_flag;
static unsigned long __user *lwa_addr;
@@ -153,80 +152,6 @@ void show_registers(struct pt_regs *regs)
printk("\n");
}
-void nommu_dump_state(struct pt_regs *regs,
- unsigned long ea, unsigned long vector)
-{
- int i;
- unsigned long addr, stack = regs->sp;
-
- printk("\n\r[nommu_dump_state] :: ea %lx, vector %lx\n\r", ea, vector);
-
- printk("CPU #: %d\n"
- " PC: %08lx SR: %08lx SP: %08lx\n",
- 0, regs->pc, regs->sr, regs->sp);
- printk("GPR00: %08lx GPR01: %08lx GPR02: %08lx GPR03: %08lx\n",
- 0L, regs->gpr[1], regs->gpr[2], regs->gpr[3]);
- printk("GPR04: %08lx GPR05: %08lx GPR06: %08lx GPR07: %08lx\n",
- regs->gpr[4], regs->gpr[5], regs->gpr[6], regs->gpr[7]);
- printk("GPR08: %08lx GPR09: %08lx GPR10: %08lx GPR11: %08lx\n",
- regs->gpr[8], regs->gpr[9], regs->gpr[10], regs->gpr[11]);
- printk("GPR12: %08lx GPR13: %08lx GPR14: %08lx GPR15: %08lx\n",
- regs->gpr[12], regs->gpr[13], regs->gpr[14], regs->gpr[15]);
- printk("GPR16: %08lx GPR17: %08lx GPR18: %08lx GPR19: %08lx\n",
- regs->gpr[16], regs->gpr[17], regs->gpr[18], regs->gpr[19]);
- printk("GPR20: %08lx GPR21: %08lx GPR22: %08lx GPR23: %08lx\n",
- regs->gpr[20], regs->gpr[21], regs->gpr[22], regs->gpr[23]);
- printk("GPR24: %08lx GPR25: %08lx GPR26: %08lx GPR27: %08lx\n",
- regs->gpr[24], regs->gpr[25], regs->gpr[26], regs->gpr[27]);
- printk("GPR28: %08lx GPR29: %08lx GPR30: %08lx GPR31: %08lx\n",
- regs->gpr[28], regs->gpr[29], regs->gpr[30], regs->gpr[31]);
- printk(" RES: %08lx oGPR11: %08lx\n",
- regs->gpr[11], regs->orig_gpr11);
-
- printk("Process %s (pid: %d, stackpage=%08lx)\n",
- ((struct task_struct *)(__pa(current)))->comm,
- ((struct task_struct *)(__pa(current)))->pid,
- (unsigned long)current);
-
- printk("\nStack: ");
- printk("Stack dump [0x%08lx]:\n", (unsigned long)stack);
- for (i = 0; i < kstack_depth_to_print; i++) {
- if (((long)stack & (THREAD_SIZE - 1)) == 0)
- break;
- stack++;
-
- printk("%lx :: sp + %02d: 0x%08lx\n", stack, i * 4,
- *((unsigned long *)(__pa(stack))));
- }
- printk("\n");
-
- printk("Call Trace: ");
- i = 1;
- while (((long)stack & (THREAD_SIZE - 1)) != 0) {
- addr = *((unsigned long *)__pa(stack));
- stack++;
-
- if (kernel_text_address(addr)) {
- if (i && ((i % 6) == 0))
- printk("\n ");
- printk(" [<%08lx>]", addr);
- i++;
- }
- }
- printk("\n");
-
- printk("\nCode: ");
-
- for (i = -24; i < 24; i++) {
- unsigned long word;
-
- word = ((unsigned long *)(__pa(regs->pc)))[i];
-
- print_data(regs->pc, word, i);
- }
- printk("\n");
-}
-
/* This is normally the 'Oops' routine */
void __noreturn die(const char *str, struct pt_regs *regs, long err)
{
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/8] openrisc: Remove unused tlb_init function
[not found] <20230821072007.2698186-1-shorne@gmail.com>
` (5 preceding siblings ...)
2023-08-21 7:20 ` [PATCH 6/8] openriac: Remove unused nommu_dump_state function Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
2023-08-21 7:20 ` [PATCH 8/8] openrisc: Remove kernel-doc marker from ioremap comment Stafford Horne
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML
Cc: Stafford Horne, Arnd Bergmann, Jonas Bonn, Stefan Kristiansson,
linux-openrisc
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:
arch/openrisc/mm/tlb.c:188:13: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes]
This function is not implemented or used so remove it.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/mm/init.c | 2 --
arch/openrisc/mm/tlb.c | 9 ---------
2 files changed, 11 deletions(-)
diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c
index d531ab82be12..1dcd78c8f0e9 100644
--- a/arch/openrisc/mm/init.c
+++ b/arch/openrisc/mm/init.c
@@ -123,8 +123,6 @@ static void __init map_ram(void)
void __init paging_init(void)
{
- extern void tlb_init(void);
-
int i;
printk(KERN_INFO "Setting up paging and PTEs.\n");
diff --git a/arch/openrisc/mm/tlb.c b/arch/openrisc/mm/tlb.c
index e2f2a3c3bb22..3115f2e4f864 100644
--- a/arch/openrisc/mm/tlb.c
+++ b/arch/openrisc/mm/tlb.c
@@ -182,12 +182,3 @@ void destroy_context(struct mm_struct *mm)
flush_tlb_mm(mm);
}
-
-/* called once during VM initialization, from init.c */
-
-void __init tlb_init(void)
-{
- /* Do nothing... */
- /* invalidate the entire TLB */
- /* flush_tlb_all(); */
-}
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 8/8] openrisc: Remove kernel-doc marker from ioremap comment
[not found] <20230821072007.2698186-1-shorne@gmail.com>
` (6 preceding siblings ...)
2023-08-21 7:20 ` [PATCH 7/8] openrisc: Remove unused tlb_init function Stafford Horne
@ 2023-08-21 7:20 ` Stafford Horne
7 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2023-08-21 7:20 UTC (permalink / raw)
To: LKML; +Cc: Stafford Horne, Jonas Bonn, Stefan Kristiansson, linux-openrisc
Replace the kernel-doc marker (/**) with a regular comment to fix the
warning:
arch/openrisc/mm/ioremap.c:108: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/mm/ioremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c
index 8ec0dafecf25..c6717f876c1c 100644
--- a/arch/openrisc/mm/ioremap.c
+++ b/arch/openrisc/mm/ioremap.c
@@ -104,7 +104,7 @@ void iounmap(volatile void __iomem *addr)
}
EXPORT_SYMBOL(iounmap);
-/**
+/*
* OK, this one's a bit tricky... ioremap can get called before memory is
* initialized (early serial console does this) and will want to alloc a page
* for its mapping. No userspace pages will ever get allocated before memory
--
2.39.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-08-21 7:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230821072007.2698186-1-shorne@gmail.com>
2023-08-21 7:20 ` [PATCH 1/8] openrisc: Add missing prototypes for assembly called fnctions Stafford Horne
2023-08-21 7:20 ` [PATCH 2/8] openrisc: Declare do_signal function as static Stafford Horne
2023-08-21 7:20 ` [PATCH 3/8] openrisc: Add prototype for show_registers to processor.h Stafford Horne
2023-08-21 7:20 ` [PATCH 4/8] openrisc: Add prototype for die to bug.h Stafford Horne
2023-08-21 7:20 ` [PATCH 5/8] openrisc: Include cpu.h and switch_to.h for prototypes Stafford Horne
2023-08-21 7:20 ` [PATCH 6/8] openriac: Remove unused nommu_dump_state function Stafford Horne
2023-08-21 7:20 ` [PATCH 7/8] openrisc: Remove unused tlb_init function Stafford Horne
2023-08-21 7:20 ` [PATCH 8/8] openrisc: Remove kernel-doc marker from ioremap comment Stafford Horne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).