Signed-off-by: Robert Richter <[EMAIL PROTECTED]>
---
 arch/ia64/perfmon/perfmon.c              |    3 +--
 arch/ia64/perfmon/perfmon_default_smpl.c |    3 +--
 arch/mips/perfmon/perfmon_mips64.c       |   16 ++++++----------
 arch/powerpc/perfmon/perfmon_cell.c      |   12 ++++--------
 arch/x86/perfmon/perfmon_intel_arch.c    |    3 +--
 perfmon/perfmon_attach.c                 |    3 +--
 perfmon/perfmon_dfl_smpl.c               |    3 +--
 perfmon/perfmon_pmu.c                    |    3 +--
 perfmon/perfmon_smpl.c                   |    3 ++-
 9 files changed, 18 insertions(+), 31 deletions(-)

diff --git a/arch/ia64/perfmon/perfmon.c b/arch/ia64/perfmon/perfmon.c
index 9e55fdf..5f48261 100644
--- a/arch/ia64/perfmon/perfmon.c
+++ b/arch/ia64/perfmon/perfmon.c
@@ -266,9 +266,8 @@ void pfm_arch_release_session(struct pfm_context *ctx, u32 
cpu)
 
        spin_lock(&pfm_arch_sessions_lock);
 
-       if (is_system && ctx_arch->flags.use_dbr) {
+       if (is_system && ctx_arch->flags.use_dbr)
                pfm_arch_sessions.pfs_sys_use_dbr--;
-       }
        spin_unlock(&pfm_arch_sessions_lock);
 }
 
diff --git a/arch/ia64/perfmon/perfmon_default_smpl.c 
b/arch/ia64/perfmon/perfmon_default_smpl.c
index da0c312..702bdf9 100644
--- a/arch/ia64/perfmon/perfmon_default_smpl.c
+++ b/arch/ia64/perfmon/perfmon_default_smpl.c
@@ -179,9 +179,8 @@ static int pfm_default_fmt_handler(void *buf, struct 
pfm_ovfl_arg *arg,
         */
        if (npmds) {
                u64 *val = arg->smpl_pmds_values;
-               for (i = 0; i < npmds; i++) {
+               for (i = 0; i < npmds; i++)
                        *e++ = *val++;
-               }
        }
 
        /*
diff --git a/arch/mips/perfmon/perfmon_mips64.c 
b/arch/mips/perfmon/perfmon_mips64.c
index 3083d49..78cb43d 100644
--- a/arch/mips/perfmon/perfmon_mips64.c
+++ b/arch/mips/perfmon/perfmon_mips64.c
@@ -159,26 +159,23 @@ static int __init pfm_mips64_pmu_init_module(void)
 
        /* The R14k and older performance counters have to          */
        /* be hard-coded, as there is no support for auto-detection */
-       if ((c->cputype == CPU_R12000) || (c->cputype == CPU_R14000)) {
+       if ((c->cputype == CPU_R12000) || (c->cputype == CPU_R14000))
                num = 4;
-       } else if (c->cputype == CPU_R10000) {
+       else if (c->cputype == CPU_R10000)
                num = 2;
-       } else {
+       else
                num = n_counters();
-       }
 
        if (num == 0) {
                PFM_INFO("cputype 0x%x has no counters", c->cputype);
                return -1;
        }
        /* mark remaining counters unavailable */
-       for (i = num; i < PFM_MIPS64_NUM_PMCS; i++) {
+       for (i = num; i < PFM_MIPS64_NUM_PMCS; i++)
                pfm_mips64_pmc_desc[i].type = PFM_REG_NA;
-       }
 
-       for (i = num; i < PFM_MIPS64_NUM_PMDS; i++) {
+       for (i = num; i < PFM_MIPS64_NUM_PMDS; i++)
                pfm_mips64_pmd_desc[i].type = PFM_REG_NA;
-       }
 
        /* set the PMC_RSVD mask */
        switch (c->cputype) {
@@ -197,9 +194,8 @@ static int __init pfm_mips64_pmu_init_module(void)
           /* 6-bits for event */
           temp_mask = 0xfffffffffffff810ULL;
        }
-       for (i = 0; i < PFM_MIPS64_NUM_PMCS; i++) {
+       for (i = 0; i < PFM_MIPS64_NUM_PMCS; i++)
                pfm_mips64_pmc_desc[i].rsvd_msk = temp_mask;
-       }
 
        pfm_mips64_pmu_conf.num_pmc_entries = num;
        pfm_mips64_pmu_conf.num_pmd_entries = num;
diff --git a/arch/powerpc/perfmon/perfmon_cell.c 
b/arch/powerpc/perfmon/perfmon_cell.c
index 79fe3fd..e573071 100644
--- a/arch/powerpc/perfmon/perfmon_cell.c
+++ b/arch/powerpc/perfmon/perfmon_cell.c
@@ -552,9 +552,8 @@ int pfm_cell_pmc_check(struct pfm_context *ctx,
        s16 signal_group = RTAS_SIGNAL_GROUP(req->reg_value);
        u8 bus_word = RTAS_BUS_WORD(req->reg_value);
 
-       if (reg_num < NR_CTRS || reg_num >= (NR_CTRS * 2)) {
+       if (reg_num < NR_CTRS || reg_num >= (NR_CTRS * 2))
                return -EINVAL;
-       }
 
        switch (signal_group) {
        case SIG_GROUP_PPU_IU1:
@@ -675,9 +674,8 @@ static void pfm_cell_write_pmd(unsigned int cnum, u64 value)
                ((struct pfm_arch_pmu_info *)
                 (pfm_pmu_conf->pmu_info))->platform_info;
 
-       if (cnum < NR_CTRS) {
+       if (cnum < NR_CTRS)
                info->write_ctr(cpu, cnum, value);
-       }
 }
 
 /**
@@ -690,9 +688,8 @@ static u64 pfm_cell_read_pmd(unsigned int cnum)
                ((struct pfm_arch_pmu_info *)
                 (pfm_pmu_conf->pmu_info))->platform_info;
 
-       if (cnum < NR_CTRS) {
+       if (cnum < NR_CTRS)
                return info->read_ctr(cpu, cnum);
-       }
 
        return -EINVAL;
 }
@@ -1140,9 +1137,8 @@ static int pfm_cell_load_context(struct pfm_context *ctx)
  **/
 static void pfm_cell_unload_context(struct pfm_context *ctx)
 {
-       if (ctx->task == current || ctx->flags.system) {
+       if (ctx->task == current || ctx->flags.system)
                reset_signals(smp_processor_id());
-       }
 }
 
 /**
diff --git a/arch/x86/perfmon/perfmon_intel_arch.c 
b/arch/x86/perfmon/perfmon_intel_arch.c
index d7700c2..36762d5 100644
--- a/arch/x86/perfmon/perfmon_intel_arch.c
+++ b/arch/x86/perfmon/perfmon_intel_arch.c
@@ -174,9 +174,8 @@ static void pfm_intel_arch_check_errata(void)
         * Core Duo errata AE49 (no fix). Both counters share a single
         * enable bit in PERFEVTSEL0
         */
-       if (current_cpu_data.x86 == 6 && current_cpu_data.x86_model == 14) {
+       if (current_cpu_data.x86 == 6 && current_cpu_data.x86_model == 14)
                pfm_intel_arch_pmu_info.flags |= PFM_X86_FL_NO_SHARING;
-       }
 }
 
 static int pfm_intel_arch_probe_pmu(void)
diff --git a/perfmon/perfmon_attach.c b/perfmon/perfmon_attach.c
index f997295..448c72b 100644
--- a/perfmon/perfmon_attach.c
+++ b/perfmon/perfmon_attach.c
@@ -308,9 +308,8 @@ static void pfm_update_ovfl_pmds(struct pfm_context *ctx)
                for (i = first; num_ovfls; i++) {
                        if (test_bit(i, cast_ulp(set->povfl_pmds))) {
                                /* only correct value for counters */
-                               if (test_bit(i, cast_ulp(cnt_pmds))) {
+                               if (test_bit(i, cast_ulp(cnt_pmds)))
                                        set->pmds[i].value += 1 + ovfl_mask;
-                               }
                                num_ovfls--;
                        }
                        PFM_DBG("pmd%u set=%u val=0x%llx",
diff --git a/perfmon/perfmon_dfl_smpl.c b/perfmon/perfmon_dfl_smpl.c
index 8f18eb6..0db6801 100644
--- a/perfmon/perfmon_dfl_smpl.c
+++ b/perfmon/perfmon_dfl_smpl.c
@@ -200,9 +200,8 @@ static int pfm_dfl_fmt_handler(void *buf, struct 
pfm_ovfl_arg *arg,
         */
        if (npmds) {
                u64 *val = arg->smpl_pmds_values;
-               for (i = 0; i < npmds; i++) {
+               for (i = 0; i < npmds; i++)
                        *e++ = *val++;
-               }
        }
 
        /*
diff --git a/perfmon/perfmon_pmu.c b/perfmon/perfmon_pmu.c
index 718b4c2..f4f930f 100644
--- a/perfmon/perfmon_pmu.c
+++ b/perfmon/perfmon_pmu.c
@@ -395,9 +395,8 @@ int pfm_pmu_register(struct pfm_pmu_config *cfg)
                goto unlock;
 
        ret = pfm_sysfs_add_pmu(pfm_pmu_conf);
-       if (ret) {
+       if (ret)
                pfm_pmu_conf = NULL;
-       }
 
 unlock:
        spin_unlock(&pfm_pmu_conf_lock);
diff --git a/perfmon/perfmon_smpl.c b/perfmon/perfmon_smpl.c
index af0ed74..f650b63 100644
--- a/perfmon/perfmon_smpl.c
+++ b/perfmon/perfmon_smpl.c
@@ -437,8 +437,9 @@ void pfm_resume_after_ovfl(struct pfm_context *ctx)
        if (hdr) {
                rst_ctrl = 0;
                prefetch(hdr);
-       } else
+       } else {
                rst_ctrl = PFM_OVFL_CTRL_RESET;
+       }
 
        /*
         * if using a sampling buffer format and it has a restart callback,
-- 
1.5.3.7



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to