Skip to content

Commit d127176

Browse files
committed
Merge tag 'linux_kselftest-fixes-6.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest fixes from Shuah Khan: "Fix build warning in cachestat found during clang build and add tmpshmcstat to .gitignore" * tag 'linux_kselftest-fixes-6.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: cachestat: Fix warning on declaration under label selftests/cachestat: add tmpshmcstat file to .gitignore
2 parents 1806838 + 920aa3a commit d127176

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
test_cachestat
3+
tmpshmcstat

tools/testing/selftests/cachestat/test_cachestat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool run_cachestat_test(enum file_type type)
226226
int syscall_ret;
227227
size_t compute_len = PS * 512;
228228
struct cachestat_range cs_range = { PS, compute_len };
229-
char *filename = "tmpshmcstat";
229+
char *filename = "tmpshmcstat", *map;
230230
struct cachestat cs;
231231
bool ret = true;
232232
int fd;
@@ -257,7 +257,7 @@ bool run_cachestat_test(enum file_type type)
257257
}
258258
break;
259259
case FILE_MMAP:
260-
char *map = mmap(NULL, filesize, PROT_READ | PROT_WRITE,
260+
map = mmap(NULL, filesize, PROT_READ | PROT_WRITE,
261261
MAP_SHARED, fd, 0);
262262

263263
if (map == MAP_FAILED) {

0 commit comments

Comments
 (0)