summaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2025-11-19 22:41:08 +0000
committerJens Axboe <axboe@kernel.dk>2025-11-20 07:44:29 -0700
commit9420e720ad192c53c8d2803c5a2313b2d586adbd (patch)
tree22b61ad1803a37bec79adfa7cac4da681a4900e5 /scripts/bpf_doc.py
parente8f0abdd49baacee3886d5827f113514fcd9fd05 (diff)
block: use min() instead of min_t()
min_t(unsigned int, a, b) casts an 'unsigned long' to 'unsigned int'. Use min(a, b) instead as it promotes any 'unsigned int' to 'unsigned long' and so cannot discard significant bits. In this case the 'unsigned long' value is small enough that the result is ok. (Similarly for max_t() and clamp_t().) Detected by an extra check added to min_t(). Signed-off-by: David Laight <david.laight.linux@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions