Files
Eliot Courtney 14098e4966 rust: io: fix unused Flags::from_raw warning without CONFIG_PCI
Currently, `Flags::from_raw()` is only used by
`pci::Device::resource_flags()`, so rustc errors (with CONFIG_WERROR)
saying that it is never used when `CONFIG_PCI` is disabled.

    error: associated function `from_raw` is never used
       --> rust/kernel/io/resource.rs:240:25

`Resource::flags()` also converts the raw `flags` field to `Flags` and is
built in every config, so the easiest way to get rid of this error is
to just use it there too.

Fixes: 3f1e12fce1 ("rust: pci: add resource_flags accessor")
Reported-by: Miguel Ojeda <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Eliot Courtney <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Danilo Krummrich <[email protected]>
2026-11-01 23:37:37 +01:00
..
2026-07-11 17:59:32 +02:00