Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panic: clean Clippy warning

Clippy warns:

error: manual implementation of an assign operation
--> drivers/gpu/drm/drm_panic_qr.rs:418:25
|
418 | self.carry = self.carry % pow;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.carry %= pow`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

Thus clean it up.

Fixes: dbed4a797e00 ("drm/panic: Better binary encoding in QR code")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303093242.1011790-1-ojeda@kernel.org

authored by

Miguel Ojeda and committed by
Jocelyn Falempe
57145afa 12ec4f30

+1 -1
+1 -1
drivers/gpu/drm/drm_panic_qr.rs
··· 415 415 self.carry_len -= out_len; 416 416 let pow = u64::pow(10, self.carry_len as u32); 417 417 let out = (self.carry / pow) as u16; 418 - self.carry = self.carry % pow; 418 + self.carry %= pow; 419 419 Some((out, NUM_CHARS_BITS[out_len])) 420 420 } 421 421 }