]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
rasdaemon: fix return value type issue of read/write function from unistd.h
authorXiaofei Tan <tanxiaofei@huawei.com>
Thu, 11 May 2023 02:54:26 +0000 (10:54 +0800)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 23 Oct 2023 08:48:45 +0000 (10:48 +0200)
commit60f3e71528e5c52f6b105eee7372a4004793396d
tree369ef1e0e570763a48e8815d57064d0789ac0cec
parent2ee6734e95a56dd15879a88e08080db53d6af486
rasdaemon: fix return value type issue of read/write function from unistd.h

The return value type of read/write function from unistd.h is ssize_t.
It's signed normally, and return -1 on error. Fix incorrect use in the
function read_ras_event_all_cpus().

BTW, make setting buffer_percent as a separate function.

Fixes: 94750bcf9309 ("rasdaemon: Fix poll() on per_cpu trace_pipe_raw blocks indefinitely")
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
ras-events.c