diff options
| author | Michal Simek <michal.simek@xilinx.com> | 2014-12-18 09:56:17 -0500 |
|---|---|---|
| committer | Michal Simek <michal.simek@xilinx.com> | 2015-01-05 06:36:45 -0500 |
| commit | e76fdb324844cc0367f8c6ea5d13278a81568ccb (patch) | |
| tree | 9c9491258872824f13fe25b3476c1710748bd0aa | |
| parent | b6db0a56218c38455e52780338ad61e284a67e4c (diff) | |
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>
| -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; | |||
| 36 | 36 | ||
| 37 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 37 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
| 38 | { | 38 | { |
| 39 | int i; | 39 | unsigned int i; |
| 40 | unsigned long *pt_regb = (unsigned long *)regs; | 40 | unsigned long *pt_regb = (unsigned long *)regs; |
| 41 | int temp; | 41 | int temp; |
| 42 | |||
| 42 | /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ | 43 | /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ |
| 43 | for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++) | 44 | for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++) |
| 44 | gdb_regs[i] = pt_regb[i]; | 45 | 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 | 69 | ||
| 69 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 70 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
| 70 | { | 71 | { |
| 71 | int i; | 72 | unsigned int i; |
| 72 | unsigned long *pt_regb = (unsigned long *)regs; | 73 | unsigned long *pt_regb = (unsigned long *)regs; |
| 73 | 74 | ||
| 74 | /* pt_regs and gdb_regs have the same 37 values. | 75 | /* pt_regs and gdb_regs have the same 37 values. |
| @@ -92,7 +93,7 @@ asmlinkage void microblaze_kgdb_break(struct pt_regs *regs) | |||
| 92 | /* untested */ | 93 | /* untested */ |
| 93 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | 94 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) |
| 94 | { | 95 | { |
| 95 | int i; | 96 | unsigned int i; |
| 96 | unsigned long *pt_regb = (unsigned long *)(p->thread.regs); | 97 | unsigned long *pt_regb = (unsigned long *)(p->thread.regs); |
| 97 | 98 | ||
| 98 | /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ | 99 | /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ |
