From: Andrea Righi <andrea.righi@linux.dev>
To: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH for-6.12-fixes] sched_ext: fix fmt__str variables in kfuncs
Date: Tue, 22 Oct 2024 09:40:35 +0200 [thread overview]
Message-ID: <20241022074035.139897-1-andrea.righi@linux.dev> (raw)
Commit 3e99aee7ce48 ("sched-ext: Use correct annotation for strings in
kfuncs") renamed some parameters without updating the body of the
functions, triggering build errors like this:
kernel/sched/ext.c:6881:45: error: ‘fmt’ undeclared (first use in this function)
6881 | if (bstr_format(&scx_exit_bstr_buf, fmt, data, data__sz) >= 0)
| ^~~
Fix by renaming also the varibles in the affected kfuncs.
Fixes: 3e99aee7ce48 ("sched-ext: Use correct annotation for strings in kfuncs")
Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
---
kernel/sched/ext.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index ff24d652c386..280beea63fa9 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -6738,7 +6738,7 @@ __bpf_kfunc void scx_bpf_exit_bstr(s64 exit_code, char *fmt__str,
unsigned long flags;
raw_spin_lock_irqsave(&scx_exit_bstr_buf_lock, flags);
- if (bstr_format(&scx_exit_bstr_buf, fmt, data, data__sz) >= 0)
+ if (bstr_format(&scx_exit_bstr_buf, fmt__str, data, data__sz) >= 0)
scx_ops_exit_kind(SCX_EXIT_UNREG_BPF, exit_code, "%s",
scx_exit_bstr_buf.line);
raw_spin_unlock_irqrestore(&scx_exit_bstr_buf_lock, flags);
@@ -6759,7 +6759,7 @@ __bpf_kfunc void scx_bpf_error_bstr(char *fmt__str, unsigned long long *data,
unsigned long flags;
raw_spin_lock_irqsave(&scx_exit_bstr_buf_lock, flags);
- if (bstr_format(&scx_exit_bstr_buf, fmt, data, data__sz) >= 0)
+ if (bstr_format(&scx_exit_bstr_buf, fmt__str, data, data__sz) >= 0)
scx_ops_exit_kind(SCX_EXIT_ERROR_BPF, 0, "%s",
scx_exit_bstr_buf.line);
raw_spin_unlock_irqrestore(&scx_exit_bstr_buf_lock, flags);
@@ -6791,10 +6791,10 @@ __bpf_kfunc void scx_bpf_dump_bstr(char *fmt__str, unsigned long long *data,
/* append the formatted string to the line buf */
ret = __bstr_format(buf->data, buf->line + dd->cursor,
- sizeof(buf->line) - dd->cursor, fmt, data, data__sz);
+ sizeof(buf->line) - dd->cursor, fmt__str, data, data__sz);
if (ret < 0) {
dump_line(dd->s, "%s[!] (\"%s\", %p, %u) failed to format (%d)",
- dd->prefix, fmt, data, data__sz, ret);
+ dd->prefix, fmt__str, data, data__sz, ret);
return;
}
--
2.47.0
next reply other threads:[~2024-10-22 7:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 7:40 Andrea Righi [this message]
2024-10-22 9:58 ` Thorsten Leemhuis
2024-10-22 10:10 ` Kumar Kartikeya Dwivedi
2024-10-22 15:42 ` Tejun Heo
2024-10-23 19:03 ` Tejun Heo
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=20241022074035.139897-1-andrea.righi@linux.dev \
--to=andrea.righi@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=memxor@gmail.com \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/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®