Re: [PATCH] x86/kernel/cpu/resctrl: replace 'of->kn->priv' with of_rft()

From: Reinette Chatre
Date: Thu Jan 07 2021 - 17:30:19 EST


Hi,

On 1/4/2021 3:08 AM, zhouchuangao wrote:
The use of 'of->kn->priv' to get rftype can be found in several
places in arch/x86/kernel/cpu/resctrl/rdtgroup.c, which may reduce
readability.

So replace the direct use 'of->kn->priv' with inline function
of_rft(), which is more readable.

Readability can be subjective. The current assignment appears succinct and in my opinion the additional layer of indirection does not improve the readability.

Reinette