mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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]>