Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomo@flapping.org>
To: miguel.ojeda.sandonis@gmail.com
Cc: tomo@flapping.org, ojeda@kernel.org, arnd@arndb.de,
	krzk@kernel.org, alexandre.belloni@bootlin.com,
	linusw@kernel.org, chenhuacai@kernel.org, boqun@kernel.org,
	gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
	a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
	dakr@kernel.org, daniel.almeida@collabora.com, tamird@kernel.org,
	acourbot@nvidia.com, work@onurozkan.dev,
	rust-for-linux@vger.kernel.org, fustini@kernel.org,
	linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev,
	kernel@xen0n.name, loongarch@lists.linux.dev,
	stable@vger.kernel.org
Subject: Re: [PATCH] rust: bug: fix `dead_code` warning in `warn_on!`
Date: Sat, 08 Aug 2026 14:30:13 +0900 (JST)	[thread overview]
Message-ID: <20260808.143013.1251068388254615351.tomo@flapping.org> (raw)
In-Reply-To: <CANiq72n4=fz=JNKY0Jdm8BnLa=RmHB2B7s0bO47YTJ7hygqBZg@mail.gmail.com>

On Sat, 8 Aug 2026 01:21:23 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Sat, Aug 8, 2026 at 12:43 AM FUJITA Tomonori <tomo@flapping.org> wrote:
>>
>> I sent a fix for this bug a few days ago:
>>
>> https://lore.kernel.org/all/20260801024841.786664-1-tomo@flapping.org/
> 
> Ah, right, sorry! I also saw another one with `rusttest` for arm64 and
> riscv64. Did you see that one? We probably need a `cfg(testlib)`
> split.

Is this the one you saw?

error: invalid instruction mnemonic 'brk'
  --> rust/kernel/bug.rs:63:17
   |
63 | /                 concat!(
64 | |                     "/* {size} */",
65 | |                     include!(concat!(env!("OBJTREE"), "/rust/kernel/generated_arch_warn_asm.rs")),
66 | |                     include!(concat!(env!("OBJTREE"), "/rust/kernel/generated_arch_reachable_asm.rs")));
   | |_______________________________________________________________________________________________________^
   |
note: instantiated into assembly here
  --> <inline asm>:1:115
   |
 1 |     /* 8 */.pushsection __bug_table,"aw"; .align 2; 14470: .long 14471f - .;.short 2305;.align 2; .popsection; 14471:brk 0x800
   |                                                                                                                      ^^^

It shows up when `make rusttest` runs with `ARCH=` set to an
architecture other than the host's.

I posted a `cfg(testlib)` split for it:

https://lore.kernel.org/all/20260808022608.1125174-1-tomo@flapping.org/


While at it, a question: what is `rusttest` meant to cover when
`ARCH=` is not the host's?


  reply	other threads:[~2026-08-08  5:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 22:14 [PATCH] rust: bug: fix `dead_code` warning in `warn_on!` Miguel Ojeda
2026-08-07 22:19 ` Miguel Ojeda
2026-08-07 22:43 ` FUJITA Tomonori
2026-08-07 23:21   ` Miguel Ojeda
2026-08-08  5:30     ` FUJITA Tomonori [this message]
2026-08-08 19:40       ` Miguel Ojeda
2026-08-09  0:50         ` FUJITA Tomonori
2026-08-09  3:01           ` Miguel Ojeda
2026-08-09 14:41     ` Gary Guo

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=20260808.143013.1251068388254615351.tomo@flapping.org \
    --to=tomo@flapping.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=fustini@kernel.org \
    --cc=gary@garyguo.net \
    --cc=kernel@xen0n.name \
    --cc=krzk@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=soc@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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