Skip to content

Commit

Permalink
microblaze: Fix sparse warning - fault.c
Browse files Browse the repository at this point in the history
Warning log:
CHECK   arch/microblaze/mm/fault.c
arch/microblaze/mm/fault.c:51:6: warning: incorrect type in initializer (different address spaces)
arch/microblaze/mm/fault.c:51:6:    expected unknown type 2const [noderef] *__gu_addr<asn:1>
arch/microblaze/mm/fault.c:51:6:    got unsigned int *<noident>
arch/microblaze/mm/fault.c:68:6: warning: symbol 'bad_page_fault' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 9, 2011
1 parent 4302e52 commit 5213a9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
int fsr, int addr);

asmlinkage void sw_exception(struct pt_regs *regs);
void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig);

void die(const char *str, struct pt_regs *fp, long err);
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int store_updates_sp(struct pt_regs *regs)
{
unsigned int inst;

if (get_user(inst, (unsigned int *)regs->pc))
if (get_user(inst, (unsigned int __user *)regs->pc))
return 0;
/* check for 1 in the rD field */
if (((inst >> 21) & 0x1f) != 1)
Expand Down

0 comments on commit 5213a9c

Please sign in to comment.