gpu: nova, nova-core: rename drivers and directory to follow kebab-case
Subsystems (4)
v3 cover gpu: nova, nova-core: rename drivers and directory to follow kebab-case
Rename the nova-core and nova-drm drivers to follow kernel naming conventions before these names become UAPI (e.g. exposed via driver_override).
Changes in v3:
- Move drm::DriverInfo name/desc update from patch 1 to patch 2 (Danilo Krummrich)
- Add kbuild composite object rule to nova/Makefile to produce nova-drm.ko (Danilo Krummrich)
- Add kbuild composite object rule to nova-core/Makefile to produce nova-core.ko (Danilo Krummrich)
- Fix debugfs directory name in nova_core.rs to "nova-core" to match module name
- Patch 2 has been reworked, no review tags carried over
- Link to v2:
https://lore.kernel.org/r/[email protected]/
Changes in v2:
- Also fix nova-drm driver description from "Nvidia Graphics" to "NVIDIA Graphics and Compute" (John Hubbard)
- Rename drivers/gpu/drm/nova/ directory to drivers/gpu/drm/nova-drm/ and nova.rs to nova_drm.rs to match the module name (Danilo Krummrich)
- Link to v1:
https://lore.kernel.org/r/[email protected]/
Thanks,
Cheng-Yang
---
Cheng-Yang Chou (2):
gpu: nova, nova-core: Rename to kebab-case
gpu: nova-drm: Rename nova to nova-drm
drivers/gpu/drm/nova/Kconfig | 2 +- drivers/gpu/drm/nova/Makefile | 3 ++- drivers/gpu/drm/nova/driver.rs | 6 +++--- drivers/gpu/drm/nova/nova.rs | 2 +- drivers/gpu/nova-core/Kconfig | 2 +- drivers/gpu/nova-core/Makefile | 3 ++- drivers/gpu/nova-core/nova_core.rs | 4 ++-- 7 files changed, 12 insertions(+), 10 deletions(-)
base-commit: 37f748ed0c19e007e7c5677f5d605d6b93841792
Signature · 1 line
2.48.1
PATCH v3 1/2 gpu: nova, nova-core: Rename to kebab-case
Module names must follow kernel kebab-case convention before they are exposed as UAPI via driver_override.
Rename the nova-drm module from "Nova" to "nova-drm" and the nova-core module from "NovaCore" to "nova-core".
Update NOVA_CORE_MODULE_NAME to match the renamed nova-core module.
--- drivers/gpu/drm/nova/driver.rs | 2 +- drivers/gpu/drm/nova/nova.rs | 2 +- drivers/gpu/nova-core/nova_core.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nova/driver.rs +1 -1
@@ -36,7 +36,7 @@ pub(crate) struct NovaData { desc: c"Nvidia Graphics", }; -const NOVA_CORE_MODULE_NAME : &CStr =c"NovaCore" ; +const NOVA_CORE_MODULE_NAME : &CStr =c"nova-core" ;const AUXILIARY_NAME : &CStr =c"nova-drm" ; kernel::auxiliary_device_table!(
drivers/gpu/drm/nova/nova.rs +1 -1
@@ -10,7 +10,7 @@ kernel::module_auxiliary_driver! {type :NovaDriver , - name:"Nova" , + name:"nova-drm" , authors: ["Danilo Krummrich" ], description:"Nova GPU driver" , license:"GPL v2" ,
drivers/gpu/nova-core/nova_core.rs +1 -1
@@ -67,7 +67,7 @@ fn init(module: &'static kernel::ThisModule) -> impl PinInit<Self, Error> {module! {type :NovaCoreModule , - name:"NovaCore" , + name:"nova-core" , authors: ["Danilo Krummrich" ], description:"Nova Core GPU driver" , license:"GPL v2" ,
Signature · 1 line
2.48.1
PATCH v3 2/2 gpu: nova-drm: Rename nova to nova-drm
In reply to Cheng-Yang ChouThe .ko filenames must match the module names to ensure consistency before these names are exposed as UAPI via driver_override.
Update nova/Makefile and nova-core/Makefile so that nova-drm.ko and nova-core.ko are produced, matching the module names set in patch 1.
Update drm::DriverInfo with the correct driver name and vendor description. Fix Kconfig help text for both drivers and the debugfs directory name in nova-core to match the new module names.
--- drivers/gpu/drm/nova/Kconfig | 2 +- drivers/gpu/drm/nova/Makefile | 3 ++- drivers/gpu/drm/nova/driver.rs | 4 ++-- drivers/gpu/nova-core/Kconfig | 2 +- drivers/gpu/nova-core/Makefile | 3 ++- drivers/gpu/nova-core/nova_core.rs | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/nova/Kconfig +1 -1
@@ -14,4 +14,4 @@ config DRM_NOVA This driver is work in progress and may not be functional. - If M is selected, the module will be called nova. + If M is selected, the module will be called nova-drm.
drivers/gpu/drm/nova/Makefile +2 -1
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_DRM_NOVA) += nova.o +obj-$(CONFIG_DRM_NOVA) += nova-drm.o +nova-drm-y := nova.o
drivers/gpu/drm/nova/driver.rs +2 -2
@@ -32,8 +32,8 @@ pub(crate) struct NovaData { major: 0, minor: 0, patchlevel: 0, - name: c"nova", - desc: c"Nvidia Graphics", + name: c"nova-drm", + desc: c"NVIDIA Graphics and Compute", };const NOVA_CORE_MODULE_NAME : &CStr =c"nova-core" ;
drivers/gpu/nova-core/Kconfig +1 -1
@@ -14,4 +14,4 @@ config NOVA_CORE This driver is work in progress and may not be functional. - If M is selected, the module will be called nova_core. + If M is selected, the module will be called nova-core.
drivers/gpu/nova-core/Makefile +2 -1
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_NOVA_CORE) += nova_core.o +obj-$(CONFIG_NOVA_CORE) += nova-core.o +nova-core-y := nova_core.o
drivers/gpu/nova-core/nova_core.rs +1 -1
@@ -52,7 +52,7 @@ struct NovaCoreModule {impl InPlaceModule for NovaCoreModule {fn init (module: &'static kernel::ThisModule ) ->impl PinInit <Self ,Error > { -let dir = debugfs::Dir ::new (kernel::c_str!("nova_core" )); +let dir = debugfs::Dir ::new (kernel::c_str!("nova-core" ));// SAFETY: We are the only driver code running during init, so there // cannot be any concurrent access to `DEBUGFS_ROOT`.
Signature · 1 line
2.48.1
Quoted 1 line · Cheng-Yang Chou
[PATCH v3 0/2] gpu: nova, nova-core: rename drivers and directory to follow kebab-case
Applied, thanks!
Branch: drm-rust-next
Tree: https://gitlab.freedesktop.org/drm/rust/kernel.git
[1/2] gpu: nova, nova-core: Rename to kebab-case
commit: 4f3491f6ec85
[2/2] gpu: nova: Use module names consistently
commit: 8bfe9d72cf20
[ Change commit subject to "gpu: nova: Use module names consistently";
slightly adjust commit message. - Danilo ]The patches will appear in the next linux-next integration (typically within 24 hours on weekdays).
The patches are queued up for the upcoming merge window for the next major kernel release.