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:	Tue, 22 Dec 2015 09:15:23 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Faisal Latif <faisal.latif@...el.com>
cc:	kbuild-all@...org, dledford@...hat.com, linux-rdma@...r.kernel.org,
	netdev@...r.kernel.org, jeffrey.t.kirsher@...el.com,
	e1000-rdma@...ts.sourceforge.net, faisal.latif@...el.com
Subject: [PATCH] i40iw: fix compare_const_fl.cocci warnings

Move constants to the right of binary operators.

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

CC: Faisal Latif <faisal.latif@...el.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>

---

It's a minor point, but when I first looked at the code, I thought that 
MIN and MAX were inverted, so it could be good to change.

 i40iw_ctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
@@ -1664,7 +1664,7 @@ static enum i40iw_status_code i40iw_sc_c
 {
 	u32 pble_obj_cnt;
 
-	if (I40IW_MIN_CQ_SIZE > info->num_elem || I40IW_MAX_CQ_SIZE < info->num_elem)
+	if (info->num_elem < I40IW_MIN_CQ_SIZE || info->num_elem > I40IW_MAX_CQ_SIZE)
 		return I40IW_ERR_INVALID_SIZE;
 
 	if (info->ceq_id > I40IW_MAX_CEQID)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ