[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250512091108.2015615-1-skb99@linux.ibm.com>
Date: Mon, 12 May 2025 14:41:07 +0530
From: Saket Kumar Bhaskar <skb99@...ux.ibm.com>
To: gregkh@...uxfoundation.org
Cc: bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-next@...r.kernel.org,
hbathini@...ux.ibm.com, maddy@...ux.ibm.com, venkat88@...ux.ibm.com,
sfr@...b.auug.org.au, alexei.starovoitov@...il.com,
daniel@...earbox.net, mykolal@...com, yoong.siang.song@...el.com,
martin.lau@...ux.dev, song@...nel.org, yonghong.song@...ux.dev,
john.fastabend@...il.com, kpsingh@...nel.org, sdf@...ichev.me,
haoluo@...gle.com, jolsa@...nel.org, shuah@...nel.org
Subject: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error
On linux-next, build for bpf selftest displays an error due to
mismatch in the expected function signature of bpf_testmod_test_read
and bpf_testmod_test_write.
Commit 97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()")
changed the required type for struct bin_attribute to const struct bin_attribute.
To resolve the error, update corresponding signature for the callback.
Fixes: 97d06802d10a ("sysfs: constify bin_attribute argument of bin_attribute::read/write()")
Reported-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
Closes: https://lore.kernel.org/all/e915da49-2b9a-4c4c-a34f-877f378129f6@linux.ibm.com/
Tested-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
Signed-off-by: Saket Kumar Bhaskar <skb99@...ux.ibm.com>
---
[RESEND]:
- Added Fixes and Tested-by tag.
- Added Greg as receipent for driver-core tree.
Original patch: https://lore.kernel.org/all/20250509122348.649064-1-skb99@linux.ibm.com/
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
index 2e54b95ad898..194c442580ee 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 = {
--
2.43.5
Powered by blists - more mailing lists