Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/pmap-v6.c
Show First 20 Lines • Show All 2,736 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
/* | /* | ||||
* Is given page managed? | * Is given page managed? | ||||
*/ | */ | ||||
static __inline boolean_t | static __inline boolean_t | ||||
is_managed(vm_paddr_t pa) | is_managed(vm_paddr_t pa) | ||||
{ | { | ||||
vm_offset_t pgnum; | |||||
vm_page_t m; | vm_page_t m; | ||||
pgnum = atop(pa); | |||||
if (pgnum >= first_page) { | |||||
m = PHYS_TO_VM_PAGE(pa); | m = PHYS_TO_VM_PAGE(pa); | ||||
if (m == NULL) | if (m == NULL) | ||||
return (FALSE); | return (FALSE); | ||||
if ((m->oflags & VPO_UNMANAGED) == 0) | return ((m->oflags & VPO_UNMANAGED) == 0 ? TRUE : FALSE); | ||||
kib: the ```? TRUE : FALSE``` part is not needed, the comparison operator already produces the bool… | |||||
skraAuthorUnsubmitted Not Done Inline ActionsRight. I saw that in this morning. About bool type, is it prefered now to slowly change all occurrences of boolean_t into bool? skra: Right. I saw that in this morning. About bool type, is it prefered now to slowly change all… | |||||
kibUnsubmitted Not Done Inline ActionsI use bool type for all new code and when modifying old code. The only exception is when boolean_t is inscribed in the KPI and the pass over consumers is not desirable. kib: I use bool type for all new code and when modifying old code. The only exception is when… | |||||
return (TRUE); | |||||
} | |||||
return (FALSE); | |||||
} | } | ||||
static __inline boolean_t | static __inline boolean_t | ||||
pte1_is_managed(pt1_entry_t pte1) | pte1_is_managed(pt1_entry_t pte1) | ||||
{ | { | ||||
return (is_managed(pte1_pa(pte1))); | return (is_managed(pte1_pa(pte1))); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 4,037 Lines • Show Last 20 Lines |
the `? TRUE : FALSE``` part is not needed, the comparison operator already produces the bool typed result. You might consider changing return type of is_managed() to bool as well.