Re: [PATCH v5 01/15] rust: pci: declare IrqType and IrqTypes with impl_flags
From: Alexandre Courbot
Date: Thu Oct 01 2026 - 10:36:50 EST
On Wed Sep 30, 2026 at 12:41 PM JST, John Hubbard wrote:
> The kernel provides impl_flags! for declaring a bitmask type alongside
> the enum of its individual flags, generating the bit operators and the
> containment queries.
>
> IrqTypes open-coded that pattern with a with() builder, so a caller
> naming two interrupt types chained two calls onto IrqTypes::default().
>
> Declare both types through impl_flags!, so the same set reads as
> IrqType::Msi | IrqType::MsiX.
>
> Suggested-by: Gary Guo <gary@xxxxxxxxxxx>
> Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
Danilo, is this ok if we take this patch through drm-rust-next?