On Thu, 1 Oct 2026 11:05:52 +0000
Alice Ryhl <[email protected]> wrote:
> On Wed, Sep 30, 2026 at 06:50:28PM +0900, FUJITA Tomonori wrote:
>> > diff --git a/rust/kernel/tracepoint.rs b/rust/kernel/tracepoint.rs
>> > index c6e80aa99e8e..29d2d2d0aca8 100644
>> > --- a/rust/kernel/tracepoint.rs
>> > +++ b/rust/kernel/tracepoint.rs
>> > @@ -38,9 +38,7 @@ macro_rules! declare_trace {
>> >
>> > #[cfg(not(CONFIG_TRACEPOINTS))]
>> > {
>> > - // If tracepoints are disabled, insert a trivial use of
>> > each argument
>> > - // to avoid unused argument warnings.
>> > - $( let _unused = $argname; )*
>> > + $crate::mark_used!($($argname),*);
>> > }
>> > }
>> > )*}
>> >
>>
>> Gentle ping. Could you take a look at the tracepoint.rs part? If it
>> looks fine, I think it is easiest to take the patch through the Rust
>> tree.
>
> Why are we adding this macro?
>
> I think it's better to prefer avoiding macros if we can. The current
> code is familiar to people who know Rust idioms, and now you are
> replacing it with a kernel-specific macro that such people will not be
> familiar with.
The macro was suggested by Miguel:
https://lore.kernel.org/rust-for-linux/caniq72nwcqd3askdpqosrrqbuwwnw-s2eoscyszq9ksbmrk...@mail.gmail.com/
I think you also have a point.
Miguel, what do you think?