From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] selftest:powerpc:dscr:fix compile error in dscr_sysfs_test
Date: Tue, 11 Sep 2018 14:31:02 +0530 [thread overview]
Message-ID: <153665627544.24494.10063715137186643486.stgit@localhost.localdomain> (raw)
This patch is to fix the following compile error ocured when building
with gcc7:
[stderr] dscr_sysfs_test.c: In function ‘dscr_sysfs’:
[stderr] dscr_sysfs_test.c:63:20: error: ‘%s’ directive writing up to 255 bytes
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
---
.../selftests/powerpc/dscr/dscr_sysfs_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c b/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
index 1899bd8..72e3af0 100644
--- a/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
+++ b/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
@@ -62,7 +62,7 @@ static int check_all_cpu_dscr_defaults(unsigned long val)
if (!strstr(dp->d_name, "cpu"))
continue;
- len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name);
+ len = snprintf(file, LEN_MAX, "%scpu%ld/dscr", CPU_PATH, val);
if (len >= LEN_MAX)
continue;
if (access(file, F_OK))
reply other threads:[~2018-09-11 9:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=153665627544.24494.10063715137186643486.stgit@localhost.localdomain \
--to=mamatha4@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®