From nobody Sat Apr 4 06:09:49 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AB1831F9BD for ; Fri, 20 Mar 2026 22:03:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774044242; cv=none; b=BYwL99GHDYoCYktSBiXIp1T2l0inFiCWTrtHfPGEoTRFuDK0xMvQcU6Uv1B5DYR7d+kbMVGjdMZgoaTEnZFC4c4L27tI224/cMIOI1WA3rwVZfNDCdvFKdxzqMMAEjAqS12sufkre5ndm/Y8tmQ4A1Lu9zby6vC9z3YEnBPg+1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774044242; c=relaxed/simple; bh=oQkNYBpCA5AlmfxOePF5QgebJUzdQ5GMSBoc3afjB/0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=co6xQjf5bfiv4S7sO1NXj/ZzxkdNp+GYIKJ6mLr+FIEZEUFgrPHZysnOOsxb/pAEY8VEGeM0mcPDMgo5LVmeNyIAruAFRjciDjfY1+DHWElkknpog7L1Y3Dbu7zVUh+yN81Kg6aSFaPZM/d6AgLx1rR+2s60oCa05Q7p7xBZJSo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cnn19xi0; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cnn19xi0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774044239; x=1805580239; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oQkNYBpCA5AlmfxOePF5QgebJUzdQ5GMSBoc3afjB/0=; b=cnn19xi0lI1252cICeTGX7tm/5qXHSFD8MTEzwomFunebDFDg8axW62a zUCAmIYFAFas4FH6DeuZIM3JmF2pY3E5Uyy2uqHZ+V88oNowL/LykXqa8 MUaRTJhI6lVHRgc64TM9w7qwgGdzLO/lirG2MAO02VRCoFndg79ErSUSG ntEB/7i/vyukgVk9z5/JzoPs2YFxoBt3hxKzUk/eqCok4wpB4pPVDhars zPEVSjlWbwAcZX5hZfz56hjmxh4hGExNYbQJqE8DtBC/nDpVXmT5brdGI 7qly6gpnO+D8ouIa7FBcOXEDb+7uEI/GMzCBFPzhIxw+ed5REj1c8PXE3 g==; X-CSE-ConnectionGUID: TnSAf8nuSV+z3odqGcKOXA== X-CSE-MsgGUID: qyqQP8ZwTo2gomEDfaUwFA== X-IronPort-AV: E=McAfee;i="6800,10657,11735"; a="97758385" X-IronPort-AV: E=Sophos;i="6.23,132,1770624000"; d="scan'208";a="97758385" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 15:03:55 -0700 X-CSE-ConnectionGUID: HO/vQbH8QjWM/x/xTzQ2jw== X-CSE-MsgGUID: yAJt7dBiRZahamLcz6rihA== X-ExtLoop1: 1 Received: from rchatre-desk1.jf.intel.com ([10.165.154.99]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 15:03:55 -0700 From: Reinette Chatre To: tony.luck@intel.com, james.morse@arm.com, Dave.Martin@arm.com, babu.moger@amd.com, bp@alien8.de, tglx@linutronix.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, hpa@zytor.com, ben.horgan@arm.com, fustini@kernel.org, fenghuay@nvidia.com, peternewman@google.com, linux-kernel@vger.kernel.org, patches@lists.linux.dev, reinette.chatre@intel.com Subject: [PATCH v2 06/14] fs/resctrl: Change pattern used to track number of entries in enum Date: Fri, 20 Mar 2026 15:03:16 -0700 Message-ID: <24b86569a2d3428f7fddf3572adebaec909e696e.1774043709.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" CDP_NUM_TYPES tracks the number of different configuration types that can be applied to a resource. CDP_NUM_TYPES is required to iterate over the different configurations but is not a member of enum resctrl_conf_type to avoid the warning generated with -Wswitch when CDP_NUM_TYPES lacks a case. Add a new CDP_LAST enum entry used in CDP_NUM_TYPES definition to simplify adding a new enum entry. Do this to create a cleaner pattern for tracking the number of enum entries in resctrl in preparation for other enums needing to do so. Suggested-by: Ben Horgan Signed-off-by: Reinette Chatre Reviewed-by: Ben Horgan --- include/linux/resctrl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 006e57fd7ca5..0b28049378c8 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -69,9 +69,10 @@ enum resctrl_conf_type { CDP_NONE, CDP_CODE, CDP_DATA, + CDP_LAST =3D CDP_DATA }; =20 -#define CDP_NUM_TYPES (CDP_DATA + 1) +#define CDP_NUM_TYPES (CDP_LAST + 1) =20 /* * struct pseudo_lock_region - pseudo-lock region information --=20 2.50.1