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:	Mon, 17 Jun 2013 12:15:51 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Yehuda Sadeh <yehuda@...tank.com>, Sage Weil <sage@...tank.com>,
	Alex Elder <elder@...tank.com>
Cc:	ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] rbd: remove RBD_DEBUG

The RBD_DEBUG macro is always defined, so it serves no purpose.
Removing it has the benefit that readers of the code won't be tricked
into thinking that rbd_assert() will compile away because they didn't
define RBD_DEBUG themselves.

Signed-off-by: Paul Bolle <pebolle@...cali.nl>
---
Compile tested only.

 drivers/block/rbd.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b8a58178..d3869b4 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -44,8 +44,6 @@
 
 #include "rbd_types.h"
 
-#define RBD_DEBUG	/* Activate rbd_assert() calls */
-
 /*
  * The basic unit of block I/O is a sector.  It is interpreted in a
  * number of contexts in Linux (blk, bio, genhd), but the default is
@@ -444,7 +442,6 @@ void rbd_warn(struct rbd_device *rbd_dev, const char *fmt, ...)
 	va_end(args);
 }
 
-#ifdef RBD_DEBUG
 #define rbd_assert(expr)						\
 		if (unlikely(!(expr))) {				\
 			printk(KERN_ERR "\nAssertion failure in %s() "	\
@@ -453,9 +450,6 @@ void rbd_warn(struct rbd_device *rbd_dev, const char *fmt, ...)
 					__func__, __LINE__, #expr);	\
 			BUG();						\
 		}
-#else /* !RBD_DEBUG */
-#  define rbd_assert(expr)	((void) 0)
-#endif /* !RBD_DEBUG */
 
 static int rbd_img_obj_request_submit(struct rbd_obj_request *obj_request);
 static void rbd_img_parent_read(struct rbd_obj_request *obj_request);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ