lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 12 Mar 2022 14:39:50 +0100 (CET)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Denis Efremov <efremov@...ux.com>,
        Alasdair Kergon <agk@...hat.com>,
        Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
        linux-kernel@...r.kernel.org
Subject: [PATCH] dm raid: fix minmax.cocci warnings

From: kernel test robot <lkp@...el.com>

Simplify the code using min.

Generated by: scripts/coccinelle/misc/minmax.cocci

CC: Denis Efremov <efremov@...ux.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ