Commit e76fdb32 authored by Michal Simek's avatar Michal Simek

microblaze: Use unsigned type for "for" loop because of comparison-kgdb.c

This patch removes warnings reported by W=1:
arch/microblaze/kernel/kgdb.c: In function 'pt_regs_to_gdb_regs':
arch/microblaze/kernel/kgdb.c:43:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/kgdb.c:51:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/kgdb.c: In function 'gdb_regs_to_pt_regs':
arch/microblaze/kernel/kgdb.c:77:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/kgdb.c: In function
'sleeping_thread_to_gdb_regs':
arch/microblaze/kernel/kgdb.c:99:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/kgdb.c:103:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent b6db0a56
...@@ -36,9 +36,10 @@ struct pvr_s pvr; ...@@ -36,9 +36,10 @@ struct pvr_s pvr;
void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
{ {
int i; unsigned int i;
unsigned long *pt_regb = (unsigned long *)regs; unsigned long *pt_regb = (unsigned long *)regs;
int temp; int temp;
/* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */
for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++) for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++)
gdb_regs[i] = pt_regb[i]; gdb_regs[i] = pt_regb[i];
...@@ -68,7 +69,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) ...@@ -68,7 +69,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
{ {
int i; unsigned int i;
unsigned long *pt_regb = (unsigned long *)regs; unsigned long *pt_regb = (unsigned long *)regs;
/* pt_regs and gdb_regs have the same 37 values. /* pt_regs and gdb_regs have the same 37 values.
...@@ -92,7 +93,7 @@ asmlinkage void microblaze_kgdb_break(struct pt_regs *regs) ...@@ -92,7 +93,7 @@ asmlinkage void microblaze_kgdb_break(struct pt_regs *regs)
/* untested */ /* untested */
void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
{ {
int i; unsigned int i;
unsigned long *pt_regb = (unsigned long *)(p->thread.regs); unsigned long *pt_regb = (unsigned long *)(p->thread.regs);
/* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment