56e853fa502a4ecd7804fdd34eed7f71bb209749 Issues on kernel/profile.c file . kernel/profile.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/profile.c b/kernel/profile.c index c2199e9..594dad8 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -62,7 +62,7 @@ int profile_setup(char *str) force_schedstat_enabled(); prof_on = SLEEP_PROFILING; if (str[strlen(sleepstr)] == ',') - str += strlen(sleepstr) + 1; + str += (strlen(sleepstr) + 1); if (get_option(&str, &par)) prof_shift = par; pr_info("kernel sleep profiling enabled (shift: %ld)\n", @@ -73,7 +73,7 @@ int profile_setup(char *str) } else if (!strncmp(str, schedstr, strlen(schedstr))) { prof_on = SCHED_PROFILING; if (str[strlen(schedstr)] == ',') - str += strlen(schedstr) + 1; + str += (strlen(schedstr) + 1); if (get_option(&str, &par)) prof_shift = par; pr_info("kernel schedule profiling enabled (shift: %ld)\n", @@ -81,7 +81,7 @@ int profile_setup(char *str) } else if (!strncmp(str, kvmstr, strlen(kvmstr))) { prof_on = KVM_PROFILING; if (str[strlen(kvmstr)] == ',') - str += strlen(kvmstr) + 1; + str += (strlen(kvmstr) + 1); if (get_option(&str, &par)) prof_shift = par; pr_info("kernel KVM profiling enabled (shift: %ld)\n", @@ -401,7 +401,7 @@ static void do_profile_hits(int type, void *__pc, unsigned int nr_hits) void profile_hits(int type, void *__pc, unsigned int nr_hits) { - if (prof_on != type || !prof_buffer) + if ((prof_on != type) || !prof_buffer) return; do_profile_hits(type, __pc, nr_hits); } @@ -411,7 +411,7 @@ void profile_tick(int type) { struct pt_regs *regs = get_irq_regs(); - if (!user_mode(regs) && prof_cpu_mask != NULL && + if (!user_mode(regs) && (prof_cpu_mask != NULL) && cpumask_test_cpu(smp_processor_id(), prof_cpu_mask)) profile_hit(type, (void *)profile_pc(regs)); } @@ -485,7 +485,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) count = (prof_len+1)*sizeof(unsigned int) - p; read = 0; - while (p < sizeof(unsigned int) && count > 0) { + while ((p < sizeof(unsigned int)) && (count > 0)) { if (put_user(*((char *)(&sample_step)+p), buf)) return -EFAULT; buf++; p++; count--; read++; -- 2.7.4