John Hubbard
2025-Nov-14 02:41 UTC
[PATCH v8 4/6] gpu: nova-core: use ENOTSUPP for unsupported GPUs, in all cases
Some places in the driver use ENODEV for unsupported GPUs, while others
use ENOTSUPP. ENOTSUPP is more accurate, so change the ENODEV instances
to ENOTSUPP.
Cc: Alexandre Courbot <acourbot at nvidia.com>
Cc: Danilo Krummrich <dakr at kernel.org>
Cc: Timur Tabi <ttabi at nvidia.com>
Cc: Joel Fernandes <joelagnelf at nvidia.com>
Signed-off-by: John Hubbard <jhubbard at nvidia.com>
---
drivers/gpu/nova-core/gpu.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index c1eca052968b..aa8e881dd474 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -62,7 +62,7 @@ impl TryFrom<u32> for Chipset {
fn try_from(value: u32) -> Result<Self, Self::Error> {
match value {
$( $value => Ok(Chipset::$variant), )*
- _ => Err(ENODEV),
+ _ => Err(ENOTSUPP),
}
}
}
@@ -143,7 +143,7 @@ fn try_from(value: u8) -> Result<Self> {
0x16 => Ok(Self::Turing),
0x17 => Ok(Self::Ampere),
0x19 => Ok(Self::Ada),
- _ => Err(ENODEV),
+ _ => Err(ENOTSUPP),
}
}
}
--
2.51.2
Alexandre Courbot
2025-Nov-14 15:03 UTC
[PATCH v8 4/6] gpu: nova-core: use ENOTSUPP for unsupported GPUs, in all cases
On Fri Nov 14, 2025 at 11:41 AM JST, John Hubbard wrote:> Some places in the driver use ENODEV for unsupported GPUs, while others > use ENOTSUPP. ENOTSUPP is more accurate, so change the ENODEV instances > to ENOTSUPP.Mmm actually I suspect we do want to return `ENODEV` in those cases, for the driver core to interpret the error as "I reject this particular device": https://elixir.bootlin.com/linux/v6.13/source/drivers/base/dd.c#L588