Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639251
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support |
| Date | 2017-05-11 10:50 +0200 |
| Message-ID | <tFRXj-44b-9@gated-at.bofh.it> (permalink) |
| References | <tDpVv-4CY-1@gated-at.bofh.it> <tDpVw-4CY-13@gated-at.bofh.it> <tFyKZ-Es-1@gated-at.bofh.it> <tFJwK-76F-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 11 May 2017, Stephen Rothwell wrote:
> Hi,
>
> On Wed, 10 May 2017 14:09:53 +0200 (CEST) Thomas Gleixner <tglx@linutronix.de> wrote:
> >
> > > +static void nest_change_cpu_context(int old_cpu, int new_cpu)
> > > +{
> > > + int i;
> > > +
> > > + for (i = 0;
> > > + (per_nest_pmu_arr[i] != NULL) && (i < IMC_MAX_PMUS); i++)
> > > + perf_pmu_migrate_context(&per_nest_pmu_arr[i]->pmu,
> > > + old_cpu, new_cpu);
> >
> > Bah, this is horrible to read.
> >
> > struct imc_pmu **pn = per_nest_pmu_arr;
> > int i;
> >
> > for (i = 0; *pn && i < IMC_MAX_PMUS; i++, pn++)
> > perf_pmu_migrate_context(&(*pn)->pmu, old_cpu, new_cpu);
>
> (Just a bit of bike shedding ...)
>
> Or even (since "i" is not used any more):
>
> struct imc_pmu **pn;
>
> for (pn = per_nest_pmu_arr;
> pn < &per_nest_pmu_arr[IMC_MAX_PMUS] && *pn;
> pn++)
> perf_pmu_migrate_context(&(*pn)->pmu, old_cpu, new_cpu);
Which is equally unreadable as the original code I complained about. Is that
a corporate preference?
Thanks,
tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 00/10] IMC Instrumentation Support Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 10/10] powerpc/perf: Thread imc cpuhotplug support Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Daniel Axtens <dja@axtens.net> - 2017-05-08 16:20 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Madhavan Srinivasan <maddy@linux.vnet.ibm.com> - 2017-05-09 08:20 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-09 13:00 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Thomas Gleixner <tglx@linutronix.de> - 2017-05-10 14:20 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Stephen Rothwell <sfr@canb.auug.org.au> - 2017-05-11 01:50 +0200
Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support Thomas Gleixner <tglx@linutronix.de> - 2017-05-11 10:50 +0200
[PATCH v8 06/10] powerpc/powernv: Core IMC events detection Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 08/10] powerpc/powernv: Thread IMC events detection Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 01/10] powerpc/powernv: Data structure and macros definitions for IMC Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 09/10] powerpc/perf: Thread IMC PMU functions Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 04/10] powerpc/perf: Add generic IMC pmu groupand event functions Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 03/10] powerpc/powernv: Detect supported IMC units and its events Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
[PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module Anju T Sudhakar <anju@linux.vnet.ibm.com> - 2017-05-04 16:30 +0200
Re: [PATCH v8 02/10] powerpc/powernv: Autoload IMC device driver module Stewart Smith <stewart@linux.vnet.ibm.com> - 2017-05-11 09:50 +0200
csiph-web