diff options
author | Michal Simek <michal.simek@xilinx.com> | 2014-12-18 17:56:17 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-01-05 14:36:45 +0300 |
commit | e76fdb324844cc0367f8c6ea5d13278a81568ccb (patch) | |
tree | 9c9491258872824f13fe25b3476c1710748bd0aa /arch/microblaze | |
parent | b6db0a56218c38455e52780338ad61e284a67e4c (diff) | |
download | linux-e76fdb324844cc0367f8c6ea5d13278a81568ccb.tar.xz |
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: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/kernel/kgdb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/microblaze/kernel/kgdb.c b/arch/microblaze/kernel/kgdb.c index 4bd44b6cbc3b..8736af5806ae 100644 --- a/arch/microblaze/kernel/kgdb.c +++ b/arch/microblaze/kernel/kgdb.c @@ -36,9 +36,10 @@ struct pvr_s pvr; 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; int temp; + /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; 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) 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; /* pt_regs and gdb_regs have the same 37 values. @@ -92,7 +93,7 @@ asmlinkage void microblaze_kgdb_break(struct pt_regs *regs) /* untested */ 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); /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ |