Re: [PATCH v1 09/11] arm_mpam: resctrl: Make read_mon_cdp_safe() self consistent

From: Gavin Shan

Date: Thu Jul 16 2026 - 00:51:59 EST


On 7/10/26 9:55 PM, Ben Horgan wrote:
When read_mon_cdp_safe() is called with cdp_enabled equal to false then the
reading returned in val is the sum of the monitor values for the given
component. However, when cdp_enabled equal to true it is again the sum of
the monitor values but with the initial value of val also added.

Change the cdp_enabled equals true case to match the false case. All
callers zero the val before calling and so no functional change is
anticipated.

Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
drivers/resctrl/mpam_resctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>