aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/display/drm_dp_mst_topology.c
diff options
context:
space:
mode:
authorMiguel Ojeda <[email protected]>2025-03-01 23:16:01 +0000
committerJocelyn Falempe <[email protected]>2025-03-07 16:22:23 +0000
commit986c2e9ca818b0b74cfc737517549fd0b80ff15d (patch)
treec9495c1a3d67b50128a553b1e13a61e7e9442829 /drivers/gpu/drm/display/drm_dp_mst_topology.c
parentdrm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() (diff)
downloadkernel-986c2e9ca818b0b74cfc737517549fd0b80ff15d.tar.gz
kernel-986c2e9ca818b0b74cfc737517549fd0b80ff15d.zip
drm/panic: use `div_ceil` to clean Clippy warning
Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03), Clippy warns: error: manually reimplementing `div_ceil` --> drivers/gpu/drm/drm_panic_qr.rs:548:26 | 548 | let pad_offset = (offset + 7) / 8; | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `offset.div_ceil(8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil And similarly for `stride`. Thus apply the suggestion to both. The behavior (and thus codegen) is not exactly equivalent [1][2], since `div_ceil()` returns the right value for the values that currently would overflow. Link: https://github.com/rust-lang/rust-clippy/issues/14333 [1] Link: https://godbolt.org/z/dPq6nGnv3 [2] Signed-off-by: Miguel Ojeda <[email protected]> Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen") Cc: [email protected] # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Signed-off-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/display/drm_dp_mst_topology.c')
0 files changed, 0 insertions, 0 deletions