]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftests/resctrl: Fix compilation issues for other global variables
authorFenghua Yu <fenghua.yu@intel.com>
Wed, 17 Mar 2021 02:22:37 +0000 (02:22 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:32:11 +0000 (10:32 +0200)
commit925fcb63fce070b94195ac0ec57adb711c22c703
tree6bee58e45eeb330960303bcc03c2a2c1d7768f41
parent5d2ebbf4565bb639c3a51611d14d2b98d95f7fc5
selftests/resctrl: Fix compilation issues for other global variables

BugLink: https://bugs.launchpad.net/bugs/1928857
[ Upstream commit 896016d2ad051811ff9c9c087393adc063322fbc ]

Reinette reported following compilation issue on Fedora 32, gcc version
10.1.1

/usr/bin/ld: resctrl_tests.o:<src_dir>/resctrl.h:65: multiple definition
of `bm_pid'; cache.o:<src_dir>/resctrl.h:65: first defined here

Other variables are ppid, tests_run, llc_occup_path, is_amd. Compiler
isn't happy because these variables are defined globally in two .c files
but are not declared as extern.

To fix issues for the global variables, declare them as extern.

Chang Log:
- Split this patch from v4's patch 1 (Shuah).

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
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.h