Merge tag 'drm/panel/for-4.4-rc1' of git://anongit.freedesktop.org/tegra/linux into...
[firefly-linux-kernel-4.4.55.git] / tools / perf / tests / rdpmc.c
index c04d1f268576568f8a5b32c77e95796f40d8b723..d31f2c4d9f6491c62893f00cfbf46cdeff12ec90 100644 (file)
@@ -100,6 +100,7 @@ static int __test__rdpmc(void)
        };
        u64 delta_sum = 0;
         struct sigaction sa;
+       char sbuf[STRERR_BUFSIZE];
 
        sigfillset(&sa.sa_mask);
        sa.sa_sigaction = segfault_handler;
@@ -109,14 +110,15 @@ static int __test__rdpmc(void)
                                 perf_event_open_cloexec_flag());
        if (fd < 0) {
                pr_err("Error: sys_perf_event_open() syscall returned "
-                      "with %d (%s)\n", fd, strerror(errno));
+                      "with %d (%s)\n", fd,
+                      strerror_r(errno, sbuf, sizeof(sbuf)));
                return -1;
        }
 
        addr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
        if (addr == (void *)(-1)) {
                pr_err("Error: mmap() syscall returned with (%s)\n",
-                      strerror(errno));
+                      strerror_r(errno, sbuf, sizeof(sbuf)));
                goto out_close;
        }