[igt-dev] [PATCH v23 06/14] test: perf_pmu: use the gem_engine_topology library

Andi Shyti andi.shyti at intel.com
Mon May 13 14:15:34 UTC 2019


Hi Chris,

On Mon, May 13, 2019 at 12:57:00PM +0100, Chris Wilson wrote:
> Quoting Andi Shyti (2019-05-13 01:45:00)
> >  static void
> > -init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample)
> > +init(int gem_fd, struct intel_execution_engine2 *e, uint8_t sample)
> 
> There's a lot of const dropping where const seems appropriate throughout
> this series? Did I misread and there's a reason throughout why we are
> rewriting the caller's struct?

'const' is not needed anymore... why keep variables const while
we are not declaring them const?

Ther reason in a first place for having 'const' all around was
because we were looping through the "const struct
intel_execution_engine2 intel_execution_engines2[]" array, which
we are not doing anymore.

I see 'const' as somehow "type-incoherent".

Andi


More information about the igt-dev mailing list