summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorHsin-Te Yuan <yuanhsinte@chromium.org>2025-06-20 10:41:43 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-07-03 16:43:37 +0200
commit1a4aabc27e95674837f2e25f4ef340c0469e6203 (patch)
tree5a9ca0de0f6886274ec05880a2b37fb161712fcf /scripts/lib/kdoc/kdoc_files.py
parentd0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af (diff)
thermal: sysfs: Return ENODATA instead of EAGAIN for reads
According to POSIX spec, EAGAIN returned by read with O_NONBLOCK set means the read would block. Hence, the common implementation in nonblocking model will poll the file when the nonblocking read returns EAGAIN. However, when the target file is thermal zone, this mechanism will totally malfunction because thermal zone doesn't implement sysfs notification and thus the poll will never return. For example, the read in Golang implemnts such method and sometimes hangs at reading some thermal zones via sysfs. Change to return -ENODATA instead of -EAGAIN to userspace. Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Link: https://patch.msgid.link/20250620-temp-v3-1-6becc6aeb66c@chromium.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions