drm/hyperv: Replace "hyperv_" with "hv_drm_" as symbol name prefix
Subsystems (5)
PATCH v2 1/1 drm/hyperv: Replace "hyperv_" with "hv_drm_" as symbol name prefix
From: Michael Kelley <[email protected]>
Function and structure names in the Hyper-V DRM driver currently use "hyperv_" as the prefix. This conflicts with usage in core Hyper-V and VMBus code, and incorrectly implies that functions and structures in this driver apply generically to Hyper-V. A specific conflict arises for "hyperv_init", which is an initcall for generic Hyper-V initialization on arm64. The conflict prevents the use of initcall_blacklist on the kernel boot line to skip loading this driver.
Fix this by substituting "hv_drm_" as the prefix for all functions and structures in this driver. In most places, this is replacing "hyperv_" with "hv_drm_". In a few places, the substitution results in "hv_drm_drm_", which has been collapsed to just "hv_drm_". In one place, the existing prefix is a bare "hv_", which has been replaced with "hv_drm_" for consistency.
The changes are all mechanical text substitution in symbol names. There are no other code or functional changes.
---
This patch is built against linux-next20260526.
Changes in v2:
* Use "hv_drm_" as the new prefix instead of "hvdrm_". [Hamza Mahfooz]
* After the new prefix is applied, collapse occurrences of "hv_drm_drm_" to just "hv_drm_", such as with hv_drm_device. [Hamza Mahfooz]
* Don't change comments referring to source code filenames. [Dexuan Cui]
* Change hv_fops to hv_drm_fops for consistency.
drivers/gpu/drm/hyperv/hyperv_drm.h | 16 +-- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 92 ++++++++-------- drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 110 ++++++++++---------- drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 70 ++++++------- 4 files changed, 144 insertions(+), 144 deletions(-)
drivers/gpu/drm/hyperv/hyperv_drm.h +8 -8
@@ -8,7 +8,7 @@#define VMBUS_MAX_PACKET_SIZE 0x4000 -struct hyperv_drm_device { +struct hv_drm_device {/* drm */ struct drm_device dev;struct drm_plane plane;
@@ -39,17 +39,17 @@ struct hyperv_drm_device { struct hv_device *hdev; }; -#define to_hv (_dev) container_of(_dev, struct hyperv_drm_device, dev) +#define to_hv (_dev) container_of(_dev, struct hv_drm_device, dev)/* hyperv_drm_modeset */ -int hyperv_mode_config_init (struct hyperv_drm_device *hv); +int hv_drm_mode_config_init (struct hv_drm_device *hv);/* hyperv_drm_proto */ -int hyperv_update_vram_location (struct hv_device *hdev,phys_addr_t vram_pp); -int hyperv_update_situation (struct hv_device *hdev,u8 active,u32 bpp, +int hv_drm_update_vram_location (struct hv_device *hdev,phys_addr_t vram_pp); +int hv_drm_update_situation (struct hv_device *hdev,u8 active,u32 bpp,u32 w,u32 h,u32 pitch); -int hyperv_hide_hw_ptr (struct hv_device *hdev); -int hyperv_update_dirt (struct hv_device *hdev,struct drm_rect *rect); -int hyperv_connect_vsp (struct hv_device *hdev); +int hv_drm_hide_hw_ptr (struct hv_device *hdev); +int hv_drm_update_dirt (struct hv_device *hdev,struct drm_rect *rect); +int hv_drm_connect_vsp (struct hv_device *hdev);#endif
drivers/gpu/drm/hyperv/hyperv_drm_drv.c +46 -46
221 lines not on this page · raw message
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c +55 -55
280 lines not on this page · raw message
drivers/gpu/drm/hyperv/hyperv_drm_proto.c +35 -35
220 lines not on this page · raw message
Signature · 1 line
2.25.1
drivers/gpu/drm/hyperv/hyperv_drm.h struct hyperv_drm_device { · line 42
Quoted 5 lines
From: Michael Kelley <[email protected]>
Sent: Thursday, May 28, 2026 6:51 AM
...drivers/gpu/drm/hyperv/hyperv_drm.h +1
-1-#define to_hv (_dev) container_of(_dev, struct hyperv_drm_device, dev) +#define to_hv (_dev) container_of(_dev, struct hv_drm_device, dev)
A minor nit: change "to_hv" to "to_hv_drm"? Otherwise, LGTM.
From: Dexuan Cui <[email protected]> Sent: Thursday, May 28, 2026 9:53 AM
Quoted 8 lines
drivers/gpu/drm/hyperv/hyperv_drm.h struct hyperv_drm_device { · line 42
Quoted 6 lines
From: Michael Kelley <[email protected]>
Sent: Thursday, May 28, 2026 6:51 AM
...drivers/gpu/drm/hyperv/hyperv_drm.h +1
-1-#define to_hv (_dev) container_of(_dev, struct hyperv_drm_device, dev) +#define to_hv (_dev) container_of(_dev, struct hv_drm_device, dev)A minor nit: change "
to_hv" to "to_hv_drm"? Otherwise, LGTM.
Yes, that makes sense. It's not a symbol that would appear in, and cause confusion in, a global symbol list. But the "hv" in "to_hv" is effectively the prefix, so for completeness change it as well.
I'll send a v3 shortly.
Quoted 2 lines
Reviewed-by Dexuan Cui <[email protected]>
Thanks for reviewing.
Michael