Commit 76a13da7 authored by ye xingchen's avatar ye xingchen Committed by Hans de Goede
Browse files

platform/x86: intel-uncore-freq: Use sysfs_emit() to instead of scnprintf()



Replace the open-code with sysfs_emit() to simplify the code.

Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220923063314.239146-1-ye.xingchen@zte.com.cn


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent bbfa903b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ show_uncore_perf_status(current_freq_khz);
		struct uncore_data *data = container_of(attr, struct uncore_data,\
							  member_name##_dev_attr);\
									\
		return scnprintf(buf, PAGE_SIZE, "%u\n",		\
		return sysfs_emit(buf, "%u\n",				\
				 data->member_name);			\
	}								\