Skip to content

Commit

Permalink
sparc64: Fix sparse warnings in global reg snapshotting.
Browse files Browse the repository at this point in the history
Lots of shadowed local variables and global_reg_snapshot[] needs
an extern declaration in asm/ptrace_64.h.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 12, 2008
1 parent 4845afa commit 8f20b20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions arch/sparc/include/asm/ptrace_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ struct sparc_trapf {

#ifdef __KERNEL__

#include <linux/threads.h>

static inline int pt_regs_trap_type(struct pt_regs *regs)
{
return regs->magic & 0x1ff;
Expand All @@ -138,6 +140,7 @@ struct global_reg_snapshot {
struct thread_info *thread;
unsigned long pad1;
};
extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];

#define __ARCH_WANT_COMPAT_SYS_PTRACE

Expand Down
2 changes: 0 additions & 2 deletions arch/sparc64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];

if (regs->tstate & TSTATE_PRIV) {
struct thread_info *tp = current_thread_info();
struct reg_window *rw;

rw = (struct reg_window *)
Expand Down Expand Up @@ -271,7 +270,6 @@ void __trigger_all_cpu_backtrace(void)

for_each_online_cpu(cpu) {
struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
struct thread_info *tp;

__global_reg_poll(gp);

Expand Down

0 comments on commit 8f20b20

Please sign in to comment.