x86: hw_breakpoint.c arch_check_va_in_kernelspace and hw_breakpoint_handler should be static
PATCH 1/1 x86: hw_breakpoint.c arch_check_va_in_kernelspace and hw_breakpoint_handler should be static
arch_check_va_in_kernelspace() and hw_breakpoint_handler() is used only by same file so it should be static.
Also fixed non-ANSI function declaration of function 'arch_uninstall_thread_hw_breakpoint'
Fixed following sparse warnings :
arch/x86/kernel/hw_breakpoint.c:124:42: warning: non-ANSI function declaration of function 'arch_uninstall_thread_hw_breakpoint' arch/x86/kernel/hw_breakpoint.c:169:5: warning: symbol 'arch_check_va_in_kernelspace' was not declared. Should it be static? arch/x86/kernel/hw_breakpoint.c:313:15: warning: symbol 'hw_breakpoint_handler' was not declared. Should it be static?
--- arch/x86/kernel/hw_breakpoint.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/hw_breakpoint.c +3 -3
@@ -121,7 +121,7 @@ void arch_install_thread_hw_breakpoint(struct task_struct *tsk)/* * Install the debug register values for just the kernel, no thread. */ -void arch_uninstall_thread_hw_breakpoint () +void arch_uninstall_thread_hw_breakpoint (void ) {/* Clear the user-space portion of debugreg7 by setting only kdr7 */ set_debugreg (kdr7,7 );
@@ -166,7 +166,7 @@ int arch_check_va_in_userspace(unsigned long va, u8 hbp_len)/* * Check for virtual address in kernel space. */ -int arch_check_va_in_kernelspace (unsigned long va,u8 hbp_len) +static int arch_check_va_in_kernelspace (unsigned long va,u8 hbp_len) {unsigned int len;
@@ -310,7 +310,7 @@ void arch_flush_thread_hw_breakpoint(struct task_struct *tsk)* NOTIFY_STOP returned for all other cases * */ -int __kprobes hw_breakpoint_handler (struct die_args *args) +static int __kprobes hw_breakpoint_handler (struct die_args *args) {int i, cpu, rc =NOTIFY_STOP ;struct hw_breakpoint *bp;
Signature · 1 line
1.6.0.6
Commit-ID: 4555835b707d5c778ee1c9076670bc99b1eeaf61 Gitweb: http://git.kernel.org/tip/4555835b707d5c778ee1c9076670bc99b1eeaf61 Author: Jaswinder Singh Rajput <[email protected]> AuthorDate: Wed, 17 Jun 2009 14:44:19 +0530 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 17 Jun 2009 18:56:30 +0200
x86: hw_breakpoint.c arch_check_va_in_kernelspace and hw_breakpoint_handler should be static
arch_check_va_in_kernelspace() and hw_breakpoint_handler() is used only by same file so it should be static.
Also fixed non-ANSI function declaration of function 'arch_uninstall_thread_hw_breakpoint'
Fixed following sparse warnings :
arch/x86/kernel/hw_breakpoint.c:124:42: warning: non-ANSI function declaration of function 'arch_uninstall_thread_hw_breakpoint' arch/x86/kernel/hw_breakpoint.c:169:5: warning: symbol 'arch_check_va_in_kernelspace' was not declared. Should it be static? arch/x86/kernel/hw_breakpoint.c:313:15: warning: symbol 'hw_breakpoint_handler' was not declared. Should it be static?
LKML-Reference: <[email protected]>
--- arch/x86/kernel/hw_breakpoint.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/hw_breakpoint.c +3 -3
@@ -121,7 +121,7 @@ void arch_install_thread_hw_breakpoint(struct task_struct *tsk)/* * Install the debug register values for just the kernel, no thread. */ -void arch_uninstall_thread_hw_breakpoint () +void arch_uninstall_thread_hw_breakpoint (void ) {/* Clear the user-space portion of debugreg7 by setting only kdr7 */ set_debugreg (kdr7,7 );
@@ -166,7 +166,7 @@ int arch_check_va_in_userspace(unsigned long va, u8 hbp_len)/* * Check for virtual address in kernel space. */ -int arch_check_va_in_kernelspace (unsigned long va,u8 hbp_len) +static int arch_check_va_in_kernelspace (unsigned long va,u8 hbp_len) {unsigned int len;
@@ -310,7 +310,7 @@ void arch_flush_thread_hw_breakpoint(struct task_struct *tsk)* NOTIFY_STOP returned for all other cases * */ -int __kprobes hw_breakpoint_handler (struct die_args *args) +static int __kprobes hw_breakpoint_handler (struct die_args *args) {int i, cpu, rc =NOTIFY_STOP ;struct hw_breakpoint *bp;