arm_mpam: Fix the build error in resctrl_arch_is_evt_configurable()
PATCH 1/1 arm_mpam: Fix the build error in resctrl_arch_is_evt_configurable()
Move the declaration of the variable 'cprops' outside of the switch statement in order to resolve the build error.
mpam_resctrl.c: In function ‘resctrl_arch_is_evt_configurable’:
mpam_resctrl.c:745:3: error: a label can only be part of a statement and a declaration is not a statement
745 | struct mpam_props *cprops;
| ^~~~~~Signed-off-by Shanker Donthineni <[email protected]>
--- drivers/platform/mpam/mpam_resctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/mpam/mpam_resctrl.c +2 -1
@@ -740,9 +740,10 @@ static void mpam_resctrl_pick_mba(void)bool resctrl_arch_is_evt_configurable (enum resctrl_event_id evt) { +struct mpam_props *cprops; +switch (evt) {case QOS_L3_MBM_LOCAL_EVENT_ID : -struct mpam_props *cprops;if (!mbm_local_class)return false;
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel