* [PATCH] dm raid: fix minmax.cocci warnings
@ 2022-03-12 13:39 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2022-03-12 13:39 UTC (permalink / raw)
To: kbuild-all, linux-kernel, Denis Efremov, Alasdair Kergon,
Mike Snitzer, dm-devel, linux-kernel
From: kernel test robot <lkp@intel.com>
Simplify the code using min.
Generated by: scripts/coccinelle/misc/minmax.cocci
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 68453767131a5deec1e8f9ac92a9042f929e585d
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script
:::::: branch date: 12 hours ago
:::::: commit date: 11 months ago
drivers/md/dm-raid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -3215,7 +3215,8 @@ size_check:
if (r)
goto bad;
- rs_setup_recovery(rs, rs->md.recovery_cp < rs->md.dev_sectors ? rs->md.recovery_cp : rs->md.dev_sectors);
+ rs_setup_recovery(rs,
+ min(rs->md.recovery_cp, rs->md.dev_sectors));
} else {
/* This is no size change or it is shrinking, update size and record in superblocks */
r = rs_set_dev_and_array_sectors(rs, rs->ti->len, false);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-12 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 13:39 [PATCH] dm raid: fix minmax.cocci warnings Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®