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>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Feb 2017 16:44:51 +0800
From:   Minfei Huang <mnghuan@...il.com>
To:     bart.vanassche@...disk.com, dledford@...hat.com,
        sean.hefty@...el.com, hal.rosenstock@...il.com
Cc:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        Minfei Huang <mnghuan@...il.com>
Subject: [PATCH] ib_srp: Let compiler ignore the useless debug code

"if (0)" is used to make this block of debug code not be executed. There
is a more elegant way to let compiler ignore this code, using
"#if 0 .. #endif" instead.

Although it may be optimised by some compilers with specified parameter,
just for readable.

Signed-off-by: Minfei Huang <mnghuan@...il.com>
---
 drivers/infiniband/ulp/srp/ib_srp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 36529e3..f2d7821 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2023,12 +2023,12 @@ static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc)
 
 	opcode = *(u8 *) iu->buf;
 
-	if (0) {
-		shost_printk(KERN_ERR, target->scsi_host,
-			     PFX "recv completion, opcode 0x%02x\n", opcode);
-		print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 8, 1,
-			       iu->buf, wc->byte_len, true);
-	}
+#if 0
+	shost_printk(KERN_ERR, target->scsi_host,
+			PFX "recv completion, opcode 0x%02x\n", opcode);
+	print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 8, 1,
+			iu->buf, wc->byte_len, true);
+#endif
 
 	switch (opcode) {
 	case SRP_RSP:
-- 
2.10.1 (Apple Git-78)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ