Re: [PATCH 05/11] fs/resctrl: Use accurate type for rdt_resource::rid
From: Luck, Tony
Date: Tue Mar 03 2026 - 13:21:22 EST
On Mon, Mar 02, 2026 at 10:46:11AM -0800, Reinette Chatre wrote:
> - /* Must be the last */
> - RDT_NUM_RESOURCES,
> + /* Additions to enum need to update RDT_NUM_RESOURCES. */
> };
>
> +#define RDT_NUM_RESOURCES (RDT_RESOURCE_PERF_PKG + 1)
Alternative approach that doesn't rely on developers reading
that comment and updating the define.
Replace the RDT_NUM_RESOURCES #define with a variable initialized
to ARRAY_SIZE(rdt_resources_all).
-Tony