aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2022-08-04 10:11:33 +0300
committerJuergen Gross <[email protected]>2022-08-12 12:16:39 +0200
commit32ad11127b95236dfc52375f3707853194a7f4b4 (patch)
treeb59e8fa5103d0a3f6c4a98b17ff1458f91e2614f /tools/perf/util/trace-event-scripting.c
parent402c43ea6b34a1b371ffeed9adf907402569eaf5 (diff)
xen/xenbus: fix return type in xenbus_file_read()
This code tries to store -EFAULT in an unsigned int. The xenbus_file_read() function returns type ssize_t so the negative value is returned as a positive value to the user. This change forces another change to the min() macro. Originally, the min() macro used "unsigned" type which checkpatch complains about. Also unsigned type would break if "len" were not capped at MAX_RW_COUNT. Use size_t for the min(). (No effect on runtime for the min_t() change). Fixes: 2fb3683e7b16 ("xen: Add xenbus device driver") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Oleksandr Tyshchenko <[email protected]> Link: https://lore.kernel.org/r/YutxJUaUYRG/VLVc@kili Signed-off-by: Juergen Gross <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions