[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_A6502A28AF21A3CA88B106F3421159869708@qq.com>
Date: Wed, 4 Jun 2025 13:53:22 +0800
From: Rong Tao <rtoax@...mail.com>
To: andrii@...nel.org,
eddyz87@...il.com
Cc: rongtao@...tc.cn,
rtoax@...mail.com,
Mykola Lysenko <mykolal@...com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Peter Zijlstra <peterz@...radead.org>,
Amery Hung <ameryhung@...il.com>,
Juntong Deng <juntong.deng@...look.com>,
Oleg Nesterov <oleg@...hat.com>,
bpf@...r.kernel.org (open list:BPF [SELFTESTS] (Test Runners & Infrastructure)),
linux-kselftest@...r.kernel.org (open list:KERNEL SELFTEST FRAMEWORK),
linux-stm32@...md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM/STM32 ARCHITECTURE),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH bpf-next] selftests/bpf: Fix compile error of bin_attribute::read/write()
From: Rong Tao <rongtao@...tc.cn>
Since commit 97d06802d10a ("sysfs: constify bin_attribute argument of
bin_attribute::read/write()"), make bin_attribute parameter of
bin_attribute::read/write() const.
Signed-off-by: Rong Tao <rongtao@...tc.cn>
---
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
index e6c248e3ae54..e9e918cdf31f 100644
--- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
+++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
@@ -385,7 +385,7 @@ int bpf_testmod_fentry_ok;
noinline ssize_t
bpf_testmod_test_read(struct file *file, struct kobject *kobj,
- struct bin_attribute *bin_attr,
+ const struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t len)
{
struct bpf_testmod_test_read_ctx ctx = {
@@ -465,7 +465,7 @@ ALLOW_ERROR_INJECTION(bpf_testmod_test_read, ERRNO);
noinline ssize_t
bpf_testmod_test_write(struct file *file, struct kobject *kobj,
- struct bin_attribute *bin_attr,
+ const struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t len)
{
struct bpf_testmod_test_write_ctx ctx = {
@@ -567,7 +567,7 @@ static void testmod_unregister_uprobe(void)
static ssize_t
bpf_testmod_uprobe_write(struct file *file, struct kobject *kobj,
- struct bin_attribute *bin_attr,
+ const struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t len)
{
unsigned long offset = 0;
--
2.49.0
Powered by blists - more mailing lists