mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
drm/xe/xe_hw_engine_class_sysfs: use sysfs_emit() for attr's _show()
sprintf() is deprecated for sysfs, use preferred sysfs_emit() instead. v2: used sysfs_emit instand of sprintf Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Tejas Upadhyay <tejas.upadhyay@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231209235949.54524-3-krishnaiah.bommu@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
a3c86b6d7b
commit
91b93fae17
@ -72,7 +72,7 @@ static ssize_t job_timeout_max_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.job_timeout_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.job_timeout_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_max_attr =
|
||||
@ -108,7 +108,7 @@ static ssize_t job_timeout_min_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.job_timeout_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.job_timeout_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_min_attr =
|
||||
@ -141,7 +141,7 @@ static ssize_t job_timeout_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.job_timeout_ms);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.job_timeout_ms);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_attr =
|
||||
@ -152,7 +152,7 @@ static ssize_t job_timeout_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.job_timeout_ms);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.job_timeout_ms);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_def =
|
||||
@ -163,7 +163,7 @@ static ssize_t job_timeout_min_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.job_timeout_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_min_def =
|
||||
@ -174,7 +174,7 @@ static ssize_t job_timeout_max_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.job_timeout_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute job_timeout_max_def =
|
||||
@ -233,7 +233,7 @@ static ssize_t timeslice_duration_max_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.timeslice_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.timeslice_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_max_attr =
|
||||
@ -271,7 +271,7 @@ static ssize_t timeslice_duration_min_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.timeslice_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.timeslice_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_min_attr =
|
||||
@ -283,7 +283,7 @@ static ssize_t timeslice_duration_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.timeslice_us);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.timeslice_us);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_attr =
|
||||
@ -295,7 +295,7 @@ static ssize_t timeslice_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.timeslice_us);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.timeslice_us);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_def =
|
||||
@ -306,7 +306,7 @@ static ssize_t timeslice_min_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.timeslice_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_min_def =
|
||||
@ -317,7 +317,7 @@ static ssize_t timeslice_max_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.timeslice_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute timeslice_duration_max_def =
|
||||
@ -350,7 +350,7 @@ static ssize_t preempt_timeout_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.preempt_timeout_us);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.preempt_timeout_us);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_attr =
|
||||
@ -362,7 +362,7 @@ static ssize_t preempt_timeout_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_us);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.preempt_timeout_us);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_def =
|
||||
@ -374,7 +374,7 @@ static ssize_t preempt_timeout_min_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.preempt_timeout_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_min_def =
|
||||
@ -386,7 +386,7 @@ static ssize_t preempt_timeout_max_default(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->defaults.preempt_timeout_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_max_def =
|
||||
@ -422,7 +422,7 @@ static ssize_t preempt_timeout_max_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.preempt_timeout_max);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.preempt_timeout_max);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_max_attr =
|
||||
@ -459,7 +459,7 @@ static ssize_t preempt_timeout_min_show(struct kobject *kobj,
|
||||
{
|
||||
struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
|
||||
|
||||
return sprintf(buf, "%u\n", eclass->sched_props.preempt_timeout_min);
|
||||
return sysfs_emit(buf, "%u\n", eclass->sched_props.preempt_timeout_min);
|
||||
}
|
||||
|
||||
static const struct kobj_attribute preempt_timeout_min_attr =
|
||||
|
Loading…
x
Reference in New Issue
Block a user