From: Saket Kumar Bhaskar <skb99@linux•ibm.com>
To: gregkh@linuxfoundation•org
Cc: bpf@vger•kernel.org, linux-kselftest@vger•kernel.org,
linux-kernel@vger•kernel.org, linux-next@vger•kernel.org,
hbathini@linux•ibm.com, maddy@linux•ibm.com,
venkat88@linux•ibm.com, sfr@canb•auug.org.au,
alexei.starovoitov@gmail•com, daniel@iogearbox•net,
mykolal@fb•com, yoong.siang.song@intel•com, martin.lau@linux•dev,
song@kernel•org, yonghong.song@linux•dev,
john.fastabend@gmail•com, kpsingh@kernel•org, sdf@fomichev•me,
haoluo@google•com, jolsa@kernel•org, shuah@kernel•org
Subject: [RESEND PATCH] selftests/bpf: Fix bpf selftest build error
Date: Mon, 12 May 2025 14:41:07 +0530 [thread overview]
Message-ID: <20250512091108.2015615-1-skb99@linux.ibm.com> (raw)
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@linux•ibm.com>
Closes: https://lore.kernel.org/all/e915da49-2b9a-4c4c-a34f-877f378129f6@linux.ibm.com/
Tested-by: Venkat Rao Bagalkote <venkat88@linux•ibm.com>
Signed-off-by: Saket Kumar Bhaskar <skb99@linux•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
next reply other threads:[~2025-05-12 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 9:11 Saket Kumar Bhaskar [this message]
2025-06-03 17:32 ` [RESEND PATCH] selftests/bpf: Fix bpf selftest build error T.J. Mercier
2025-06-03 17:50 ` Alexei Starovoitov
2025-06-03 17:50 ` Song Liu
2025-06-03 17:55 ` T.J. Mercier
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=20250512091108.2015615-1-skb99@linux.ibm.com \
--to=skb99@linux$(echo .)ibm.com \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=haoluo@google$(echo .)com \
--cc=hbathini@linux$(echo .)ibm.com \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kpsingh@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=maddy@linux$(echo .)ibm.com \
--cc=martin.lau@linux$(echo .)dev \
--cc=mykolal@fb$(echo .)com \
--cc=sdf@fomichev$(echo .)me \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=shuah@kernel$(echo .)org \
--cc=song@kernel$(echo .)org \
--cc=venkat88@linux$(echo .)ibm.com \
--cc=yonghong.song@linux$(echo .)dev \
--cc=yoong.siang.song@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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