openrisc/fault: Fix symbol scope warnings
authorStafford Horne <shorne@gmail.com>
Sat, 5 Feb 2022 22:55:12 +0000 (07:55 +0900)
committerStafford Horne <shorne@gmail.com>
Mon, 23 May 2022 08:15:49 +0000 (17:15 +0900)
Sparse reported the following warning:

    arch/openrisc/mm/fault.c:27:15: warning: symbol 'pte_misses' was not declared. Should it be static?
    arch/openrisc/mm/fault.c:28:15: warning: symbol 'pte_errors' was not declared. Should it be static?
    arch/openrisc/mm/fault.c:33:16: warning: symbol 'current_pgd' was not declared. Should it be static?

This patch fixes these by:
 - Remove unused pte_misses and pte_errors counters which are no longer
   used.
 - Add asm/mmu_context.h include to provide the current_pgd declaration.

Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/mm/fault.c

index 860da58d75095e9a9d4432988e8e2d0db7ca705d..53b760af3bb75b6ce12ad738428b723558be3f6a 100644 (file)
 #include <linux/perf_event.h>
 
 #include <linux/uaccess.h>
+#include <asm/mmu_context.h>
 #include <asm/siginfo.h>
 #include <asm/signal.h>
 
 #define NUM_TLB_ENTRIES 64
 #define TLB_OFFSET(add) (((add) >> PAGE_SHIFT) & (NUM_TLB_ENTRIES-1))
 
-unsigned long pte_misses;      /* updated by do_page_fault() */
-unsigned long pte_errors;      /* updated by do_page_fault() */
-
 /* __PHX__ :: - check the vmalloc_fault in do_page_fault()
  *            - also look into include/asm/mmu_context.h
  */