* [PATCH] scripts: atomic: check for argument in gen-rust-atomic-helpers.sh
@ 2026-01-08 13:08 Alice Ryhl
2026-01-08 13:54 ` Onur Özkan
0 siblings, 1 reply; 2+ messages in thread
From: Alice Ryhl @ 2026-01-08 13:08 UTC (permalink / raw)
To: Boqun Feng
Cc: Will Deacon, Peter Zijlstra, Mark Rutland, Gary Guo, Miguel Ojeda,
Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Trevor Gross, Danilo Krummrich, linux-kernel, rust-for-linux,
Alice Ryhl
Currently, running `scripts/atomic/gen-rust-atomic-helpers.sh` without
arguments results in a broken header file and grep errors:
$ scripts/atomic/gen-rust-atomic-helpers.sh
grep: : No such file or directory
grep: : No such file or directory
The user may do this to re-generate the Rust helpers, not realizing that
they called the wrong script [1]. In this scenario, point the user to
`scripts/atomic/gen-atomics.sh` instead of failing in a cryptic way.
$ scripts/atomic/gen-rust-atomic-helpers.sh
call scripts/atomic/gen-atomics.sh instead
Link: https://lore.kernel.org/r/CAH5fLghgm2pPdKen2rv6MeSXAYG_j_eCqvM0b=VbTbUM9eswKg@mail.gmail.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
scripts/atomic/gen-rust-atomic-helpers.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/atomic/gen-rust-atomic-helpers.sh b/scripts/atomic/gen-rust-atomic-helpers.sh
index 45b1e100ed7c63108ee6cb07e48a17668f860d47..1c76f8ae731de9ac069d489469b0383f256b1539 100755
--- a/scripts/atomic/gen-rust-atomic-helpers.sh
+++ b/scripts/atomic/gen-rust-atomic-helpers.sh
@@ -5,6 +5,11 @@ ATOMICDIR=$(dirname $0)
. ${ATOMICDIR}/atomic-tbl.sh
+if [ -z "$1" ]; then
+ echo "call scripts/atomic/gen-atomics.sh instead" >&2
+ exit 1
+fi
+
#gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int, arg...)
gen_proto_order_variant()
{
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20260108-gen-rust-atomic-helpers-msg-3943461645fb
Best regards,
--
Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: atomic: check for argument in gen-rust-atomic-helpers.sh
2026-01-08 13:08 [PATCH] scripts: atomic: check for argument in gen-rust-atomic-helpers.sh Alice Ryhl
@ 2026-01-08 13:54 ` Onur Özkan
0 siblings, 0 replies; 2+ messages in thread
From: Onur Özkan @ 2026-01-08 13:54 UTC (permalink / raw)
To: Alice Ryhl
Cc: Boqun Feng, Will Deacon, Peter Zijlstra, Mark Rutland, Gary Guo,
Miguel Ojeda, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich, linux-kernel,
rust-for-linux
On Thu, 08 Jan 2026 13:08:57 +0000
Alice Ryhl <aliceryhl@google.com> wrote:
> Currently, running `scripts/atomic/gen-rust-atomic-helpers.sh` without
> arguments results in a broken header file and grep errors:
>
> $ scripts/atomic/gen-rust-atomic-helpers.sh
> grep: : No such file or directory
> grep: : No such file or directory
>
> The user may do this to re-generate the Rust helpers, not realizing
> that they called the wrong script [1]. In this scenario, point the
> user to `scripts/atomic/gen-atomics.sh` instead of failing in a
> cryptic way.
>
> $ scripts/atomic/gen-rust-atomic-helpers.sh
> call scripts/atomic/gen-atomics.sh instead
>
> Link:
> https://lore.kernel.org/r/CAH5fLghgm2pPdKen2rv6MeSXAYG_j_eCqvM0b=VbTbUM9eswKg@mail.gmail.com
> Signed-off-by: Alice Ryhl <aliceryhl@google.com> ---
> scripts/atomic/gen-rust-atomic-helpers.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/scripts/atomic/gen-rust-atomic-helpers.sh
> b/scripts/atomic/gen-rust-atomic-helpers.sh index
> 45b1e100ed7c63108ee6cb07e48a17668f860d47..1c76f8ae731de9ac069d489469b0383f256b1539
> 100755 --- a/scripts/atomic/gen-rust-atomic-helpers.sh +++
> b/scripts/atomic/gen-rust-atomic-helpers.sh @@ -5,6 +5,11 @@
> ATOMICDIR=$(dirname $0)
> . ${ATOMICDIR}/atomic-tbl.sh
>
> +if [ -z "$1" ]; then
> + echo "call scripts/atomic/gen-atomics.sh instead" >&2
> + exit 1
> +fi
> +
> #gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int,
> arg...) gen_proto_order_variant()
> {
>
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20260108-gen-rust-atomic-helpers-msg-3943461645fb
>
> Best regards,
Makes sense.
Reviewed-by: Onur Özkan <work@onurozkan.dev>
thanks,
Onur
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-08 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 13:08 [PATCH] scripts: atomic: check for argument in gen-rust-atomic-helpers.sh Alice Ryhl
2026-01-08 13:54 ` Onur Özkan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox