Re: [PATCH] riscv: ptrace: avoid BIT() in UAPI header

From: Andreas Schwab

Date: Mon Mar 30 2026 - 04:16:21 EST


On Mär 30 2026, Michael Neuling wrote:

> BIT() is not available in UAPI headers — the installed linux/bits.h
> (UAPI version) does not define it. Replace BIT() with open-coded
> (1UL << x) which is the standard practice for UAPI headers, and drop
> the linux/bits.h include that was added by commit 98545620b0 ("riscv:
> ptrace: Fix BIT() compilation issues").

There is also the _BITUL macro, which may be preferable.

--
Andreas Schwab, SUSE Labs, schwab@xxxxxxx
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."