]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cacheinfo: Use sysfs_emit() for sysfs attributes show()
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:09 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:22:43 +0000 (10:22 +0100)
commit071f4ad6494aff76589ca30a2d13e74bc1e33e0f
tree018131711f5c3d5f42f408feb45f76c56bfa249f
parent365e960d296ef9f36b20971aa4854ce07817a9bb
x86/cacheinfo: Use sysfs_emit() for sysfs attributes show()

Per Documentation/filesystems/sysfs.rst, a sysfs attribute's show()
method should only use sysfs_emit() or sysfs_emit_at() when returning
values to user space.

Use sysfs_emit() for the AMD L3 cache sysfs attributes cache_disable_0,
cache_disable_1, and subcaches.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250324133324.23458-15-darwi@linutronix.de
arch/x86/kernel/cpu/amd_cache_disable.c