]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/resctrl: Move ->setup() call outside of test specific branches
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 15 Feb 2023 13:05:58 +0000 (15:05 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:16:46 +0000 (12:16 +0200)
commit0810134744f7b83d7b1dc2b568e53e7f23b8d64e
tree9531c093c34bde6fa1c07e93b788c0286fa52546
parenta2360715db8732c636919a77c41c925e55d98f30
selftests/resctrl: Move ->setup() call outside of test specific branches

BugLink: https://bugs.launchpad.net/bugs/2025067
[ Upstream commit c90b3b588e369c20087699316259fa5ebbb16f2d ]

resctrl_val() function is called only by MBM, MBA, and CMT tests which
means the else branch is never used.

Both test branches call param->setup().

Remove the unused else branch and place the ->setup() call outside of
the test specific branches reducing code duplication.

Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Stable-dep-of: fa10366cc6f4 ("selftests/resctrl: Allow ->setup() to return errors")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/testing/selftests/resctrl/resctrl_val.c