4576b7cb265f23003f5015bb6024a8aa0b13a301 Issues on kernel/pid.c file . kernel/pid.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/pid.c b/kernel/pid.c index 4d73a83..6b75210 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -55,7 +55,7 @@ int pid_max_max = PID_MAX_LIMIT; static inline int mk_pid(struct pid_namespace *pid_ns, struct pidmap *map, int off) { - return (map - pid_ns->pidmap)*BITS_PER_PAGE + off; + return ((map - pid_ns->pidmap)*BITS_PER_PAGE) + off; } #define find_next_offset(map, off) \ @@ -123,7 +123,7 @@ static int pid_before(int base, int a, int b) * (a - base + MAXUINT) % MAXUINT < (b - base + MAXUINT) % MAXUINT * and that mapping orders 'a' and 'b' with respect to 'base'. */ - return (unsigned)(a - base) < (unsigned)(b - base); + return ((unsigned)(a - base) < (unsigned)(b - base)); } /* @@ -224,7 +224,7 @@ int next_pidmap(struct pid_namespace *pid_ns, unsigned int last) offset = (last + 1) & BITS_PER_PAGE_MASK; map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE]; end = &pid_ns->pidmap[PIDMAP_ENTRIES]; - for (; map < end; map++, offset = 0) { + for (; (map < end); map++, offset = 0) { if (unlikely(!map->page)) continue; offset = find_next_bit((map)->page, BITS_PER_PAGE, offset); @@ -335,7 +335,7 @@ struct pid *alloc_pid(struct pid_namespace *ns) spin_lock_irq(&pidmap_lock); if (!(ns->nr_hashed & PIDNS_HASH_ADDING)) goto out_unlock; - for ( ; upid >= pid->numbers; --upid) { + for ( ; (upid >= pid->numbers); --upid) { hlist_add_head_rcu(&upid->pid_chain, &pid_hash[pid_hashfn(upid->nr, upid->ns)]); upid->ns->nr_hashed++; @@ -369,7 +369,7 @@ struct pid *find_pid_ns(int nr, struct pid_namespace *ns) hlist_for_each_entry_rcu(pnr, &pid_hash[pid_hashfn(nr, ns)], pid_chain) - if (pnr->nr == nr && pnr->ns == ns) + if ((pnr->nr == nr) && (pnr->ns == ns)) return container_of(pnr, struct pid, numbers[ns->level]); @@ -502,7 +502,7 @@ pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns) struct upid *upid; pid_t nr = 0; - if (pid && ns->level <= pid->level) { + if (pid && (ns->level <= pid->level)) { upid = &pid->numbers[ns->level]; if (upid->ns == ns) nr = upid->nr; -- 2.7.4