# Re: \[PATCH v10 1/5\] rust: add static\_branch\_unlikely for static\_key\_false

- From: Sami Tolvanen \<samitolvanen@google.com\>
- Date: 2024-10-11 15:23:58 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2024/10/2779345
- Thread: https://ratatoskr.run/linux-trace-kernel/2024/10/2778864/t.md

```text
On Fri, Oct 11, 2024 at 5:13 AM Gary Guo [ref] wrote:
>
> On Fri, 11 Oct 2024 10:13:34 +0000
> Alice Ryhl [ref] wrote:
>
> > +#ifndef CONFIG_JUMP_LABEL
> > +int rust_helper_static_key_count(struct static_key *key)
> > +{
> > +     return static_key_count(key);
> > +}
> > +EXPORT_SYMBOL_GPL(rust_helper_static_key_count);
>
> ^ Explicit export should be removed. This only works because we didn't
> remove export.h from all helpers.c yet, but there's a patch to do
> that and this will stop working.

What's the benefit of removing explicit exports from the Rust helper C
code? It requires special casing things like modversions for these
files, so I assume there's a reason for this. I asked about it here,
but never got a response:

https://lore.kernel.org/rust-for-linux/CABCJKudqAEvLcdqTqyfE2+iW+jeqBpnTGgYJvrZ0by6hGdfevQ@mail.gmail.com/

Sami
```
