Re: [PATCH V3 13/39] x86/intel_rdt: Introduce "bit_usage" to display cache allocations details

From: Thomas Gleixner
Date: Sat May 19 2018 - 10:26:09 EST


On Wed, 25 Apr 2018, Reinette Chatre wrote:
> + for (i = 0; i < r->num_closid; i++, ctrl++) {
> + if (closid_allocated(i)) {

You can spare an indentation level if you just do:

if (!closid_allocated())
continue;

> + mode = rdtgroup_mode_by_closid(i);
> + switch (mode) {
> + case RDT_MODE_SHAREABLE:
> + sw_shareable |= *ctrl;
> + break;
> + case RDT_MODE_EXCLUSIVE:
> + exclusive |= *ctrl;
> + break;
> + case RDT_NUM_MODES:
> + WARN(1,
> + "invalid mode for closid %d\n", i);
> + break;
> + }

Thanks,

tglx