Skip to content

Commit 18f5744

Browse files
rchatreshuahkh
authored andcommitted
selftests/resctrl: Make functions only used in same file static
Fix following sparse warnings: tools/testing/selftests/resctrl/resctrl_val.c:47:6: warning: symbol 'membw_initialize_perf_event_attr' was not declared. Should it be static? tools/testing/selftests/resctrl/resctrl_val.c:64:6: warning: symbol 'membw_ioctl_perf_event_ioc_reset_enable' was not declared. Should it be static? tools/testing/selftests/resctrl/resctrl_val.c:70:6: warning: symbol 'membw_ioctl_perf_event_ioc_disable' was not declared. Should it be static? tools/testing/selftests/resctrl/resctrl_val.c:81:6: warning: symbol 'get_event_and_umask' was not declared. Should it be static? Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent cecc795 commit 18f5744

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tools/testing/selftests/resctrl/resctrl_val.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int imcs;
4444
static struct imc_counter_config imc_counters_config[MAX_IMCS][2];
4545
static const struct resctrl_test *current_test;
4646

47-
void membw_initialize_perf_event_attr(int i, int j)
47+
static void membw_initialize_perf_event_attr(int i, int j)
4848
{
4949
memset(&imc_counters_config[i][j].pe, 0,
5050
sizeof(struct perf_event_attr));
@@ -61,13 +61,13 @@ void membw_initialize_perf_event_attr(int i, int j)
6161
PERF_FORMAT_TOTAL_TIME_ENABLED | PERF_FORMAT_TOTAL_TIME_RUNNING;
6262
}
6363

64-
void membw_ioctl_perf_event_ioc_reset_enable(int i, int j)
64+
static void membw_ioctl_perf_event_ioc_reset_enable(int i, int j)
6565
{
6666
ioctl(imc_counters_config[i][j].fd, PERF_EVENT_IOC_RESET, 0);
6767
ioctl(imc_counters_config[i][j].fd, PERF_EVENT_IOC_ENABLE, 0);
6868
}
6969

70-
void membw_ioctl_perf_event_ioc_disable(int i, int j)
70+
static void membw_ioctl_perf_event_ioc_disable(int i, int j)
7171
{
7272
ioctl(imc_counters_config[i][j].fd, PERF_EVENT_IOC_DISABLE, 0);
7373
}
@@ -78,7 +78,7 @@ void membw_ioctl_perf_event_ioc_disable(int i, int j)
7878
* @count: iMC number
7979
* @op: Operation (read/write)
8080
*/
81-
void get_event_and_umask(char *cas_count_cfg, int count, bool op)
81+
static void get_event_and_umask(char *cas_count_cfg, int count, bool op)
8282
{
8383
char *token[MAX_TOKENS];
8484
int i = 0;

0 commit comments

Comments
 (0)