1
0

drm/xe: Combine PF and VF device data into union

There is no need to keep PF and VF data fields fully separate
since we can be only in one mode at the time. Move them into
a anonymous union to save few bytes.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20250713103625.1964-2-michal.wajdeczko@intel.com
This commit is contained in:
Michal Wajdeczko
2025-07-13 12:36:19 +02:00
parent 8d4aec43f6
commit 7dcae5288a

View File

@@ -422,10 +422,12 @@ struct xe_device {
/** @sriov.__mode: SR-IOV mode (Don't access directly!) */
enum xe_sriov_mode __mode;
/** @sriov.pf: PF specific data */
struct xe_device_pf pf;
/** @sriov.vf: VF specific data */
struct xe_device_vf vf;
union {
/** @sriov.pf: PF specific data */
struct xe_device_pf pf;
/** @sriov.vf: VF specific data */
struct xe_device_vf vf;
};
/** @sriov.wq: workqueue used by the virtualization workers */
struct workqueue_struct *wq;