mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
MIPS: Return true/false (not 1/0) from bool functions
./arch/mips/kernel/uprobes.c:261:8-9: WARNING: return of 0/1 in function 'arch_uprobe_skip_sstep' with return type bool ./arch/mips/kernel/uprobes.c:78:10-11: WARNING: return of 0/1 in function 'is_trap_insn' with return type bool ./arch/mips/kvm/mmu.c:489:9-10: WARNING: return of 0/1 in function 'kvm_test_age_gfn' with return type bool ./arch/mips/kvm/mmu.c:445:8-9: WARNING: return of 0/1 in function 'kvm_unmap_gfn_range' with return type bool Signed-off-by: Huilong Deng <denghuilong@cdjrlc.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
4d2ee1be4c
commit
126b393686
@ -75,7 +75,7 @@ bool is_trap_insn(uprobe_opcode_t *insn)
|
||||
case tlt_op:
|
||||
case tltu_op:
|
||||
case tne_op:
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -87,12 +87,12 @@ bool is_trap_insn(uprobe_opcode_t *insn)
|
||||
case tlti_op:
|
||||
case tltiu_op:
|
||||
case tnei_op:
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
#define UPROBE_TRAP_NR ULONG_MAX
|
||||
@ -254,9 +254,9 @@ unsigned long uprobe_get_swbp_addr(struct pt_regs *regs)
|
||||
* See if the instruction can be emulated.
|
||||
* Returns true if instruction was emulated, false otherwise.
|
||||
*
|
||||
* For now we always emulate so this function just returns 0.
|
||||
* For now we always emulate so this function just returns false.
|
||||
*/
|
||||
bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ static int kvm_mips_mkold_gpa_pt(struct kvm *kvm, gfn_t start_gfn,
|
||||
bool kvm_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range)
|
||||
{
|
||||
kvm_mips_flush_gpa_pt(kvm, range->start, range->end);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool kvm_set_spte_gfn(struct kvm *kvm, struct kvm_gfn_range *range)
|
||||
@ -486,7 +486,7 @@ bool kvm_test_age_gfn(struct kvm *kvm, struct kvm_gfn_range *range)
|
||||
pte_t *gpa_pte = kvm_mips_pte_for_gpa(kvm, NULL, gpa);
|
||||
|
||||
if (!gpa_pte)
|
||||
return 0;
|
||||
return false;
|
||||
return pte_young(*gpa_pte);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user