summaryrefslogtreecommitdiff
path: root/rust/kernel/module_param.rs
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2025-11-19 22:41:25 +0000
committerJuergen Gross <jgross@suse.com>2025-12-05 08:46:07 +0100
commit150215b89bcf708356abcb7d3cafdd1e6068598b (patch)
tree9854932e42207e346568148a1a7d56b2b084c041 /rust/kernel/module_param.rs
parenta73d4a055622d0973e371382b16a13f9795ffec7 (diff)
drivers/xen: 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. Detected by an extra check added to min_t(). Signed-off-by: David Laight <david.laight.linux@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Message-ID: <20251119224140.8616-30-david.laight.linux@gmail.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'rust/kernel/module_param.rs')
0 files changed, 0 insertions, 0 deletions