[PATCH v6 0/4] rust: Add bug/warn abstractions

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Wed Jul 23 02:52:04 PDT 2025


On Wed, Jul 23, 2025 at 8:21 AM FUJITA Tomonori
<fujita.tomonori at gmail.com> wrote:
>
> The patch for arm64? I tried to minimize changes to the original code
> so not intentional.

The riscv one, i.e. from the range diff:

    @@ arch/riscv/include/asm/bug.h: typedef u32 bug_insn_t;
                "2:\n\t"                                        \
     -                  __BUG_ENTRY "\n\t"                      \
     -                  ".org 2b + %3\n\t"                      \
    --                  ".popsection"                           \
     +          __BUG_ENTRY(file, line, flags) "\n\t"           \
     +                  ".org 2b + " size "\n\t"                \
    -+                  ".popsection\n"                         \
    +                   ".popsection"                           \
     +
     +#define __BUG_FLAGS(flags)                                        \
     +do {                                                              \

If you look into the `.popsection` line, your patch adds a newline,
but I guess it was not intentional. In x86 there is a newline after
the directive, but there we have `extra` afterwards.

(I noticed since I went to expand the macros in a dummy file, given it
can be something tricky to spot differences in the normal diff, but it
is visible in the normal diff.)

> Yeah, I followed the original code style.

And here I meant (i.e. the first part of that paragraph) that:

    -                    "\t.org 2b+%c1\n"                                  \

now generated those two spaces around it:

    +       "\t.org 2b + " size "\n"                                        \

> I've just tested rust-next. Looks like all arches (x86, riscv, and
> arm64) works as expected.

Thanks a lot!

Cheers,
Miguel



More information about the linux-arm-kernel mailing list