Files
linux/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
T
Shuicheng Lin b6df77f40c drm/xe: Fix mismatched include guards in header files
Fix include guard macros that don't match their respective file names:

- xe_gt_idle_types.h: _XE_GT_IDLE_SYSFS_TYPES_H_ -> _XE_GT_IDLE_TYPES_H_
- xe_guc_exec_queue_types.h: _XE_GUC_ENGINE_TYPES_H_ -> _XE_GUC_EXEC_QUEUE_TYPES_H_
- xe_heci_gsc.h: __XE_HECI_GSC_DEV_H__ -> _XE_HECI_GSC_H_
- xe_hw_engine_class_sysfs.h: _XE_ENGINE_CLASS_SYSFS_H_ -> _XE_HW_ENGINE_CLASS_SYSFS_H_
- xe_late_bind_fw_types.h: _XE_LATE_BIND_TYPES_H_ -> _XE_LATE_BIND_FW_TYPES_H_
- xe_platform_types.h: _XE_PLATFORM_INFO_TYPES_H_ -> _XE_PLATFORM_TYPES_H_
- xe_tile_printk.h: _xe_tile_printk_H_ -> _XE_TILE_PRINTK_H_

These guards appear to be leftovers from file renames or copy-paste
errors. Correcting them to follow the standard convention of matching
the file name prevents potential include guard collisions.

No functional change expected.

Signed-off-by: Shuicheng Lin <[email protected]>
Reviewed-by: Nitin Gote <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-03-26 14:21:12 -07:00

44 lines
1.1 KiB
C

/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2023 Intel Corporation
*/
#ifndef _XE_HW_ENGINE_CLASS_SYSFS_H_
#define _XE_HW_ENGINE_CLASS_SYSFS_H_
#include <linux/kobject.h>
struct xe_gt;
struct xe_hw_engine_class_intf;
int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max);
/**
* struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
* eclass.
*
* When dealing with multiple eclass, this struct helps to understand which eclass
* needs to be addressed on a given sysfs call.
*/
struct kobj_eclass {
/** @base: The actual kobject */
struct kobject base;
/** @eclass: A pointer to the hw engine class interface */
struct xe_hw_engine_class_intf *eclass;
/** @xe: A pointer to the xe device */
struct xe_device *xe;
};
static inline struct xe_hw_engine_class_intf *kobj_to_eclass(struct kobject *kobj)
{
return container_of(kobj, struct kobj_eclass, base)->eclass;
}
static inline struct xe_device *kobj_to_xe(struct kobject *kobj)
{
return container_of(kobj, struct kobj_eclass, base)->xe;
}
#endif