From patchwork Mon Jun 17 10:15:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 2732491 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4F4BC0AB1 for ; Mon, 17 Jun 2013 10:19:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 072B4202BA for ; Mon, 17 Jun 2013 10:19:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECFFE202B7 for ; Mon, 17 Jun 2013 10:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932521Ab3FQKS6 (ORCPT ); Mon, 17 Jun 2013 06:18:58 -0400 Received: from cpsmtpb-ews02.kpnxchange.com ([213.75.39.5]:56337 "EHLO cpsmtpb-ews02.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932409Ab3FQKS5 (ORCPT ); Mon, 17 Jun 2013 06:18:57 -0400 Received: from cpsps-ews28.kpnxchange.com ([10.94.84.194]) by cpsmtpb-ews02.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Mon, 17 Jun 2013 12:15:51 +0200 Received: from CPSMTPM-TLF104.kpnxchange.com ([195.121.3.7]) by cpsps-ews28.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Mon, 17 Jun 2013 12:15:51 +0200 Received: from [192.168.1.102] ([212.123.139.93]) by CPSMTPM-TLF104.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Mon, 17 Jun 2013 12:15:51 +0200 Message-ID: <1371464151.26299.12.camel@x61.thuisdomein> Subject: [PATCH] rbd: remove RBD_DEBUG From: Paul Bolle To: Yehuda Sadeh , Sage Weil , Alex Elder Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 17 Jun 2013 12:15:51 +0200 X-Mailer: Evolution 3.6.4 (3.6.4-3.fc18) Mime-Version: 1.0 X-OriginalArrivalTime: 17 Jun 2013 10:15:51.0725 (UTC) FILETIME=[A51A05D0:01CE6B43] X-RcptDomain: vger.kernel.org Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);