[Drbd-dev] [PATCH] DRBD: Delete superfluous defn of "ARRY_SIZE".

Robert P. J. Day rpjday at crashcourse.ca
Tue Mar 9 13:44:36 CET 2010


Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>

---

  given that the macro is misspelled, no one appears to use it, and
there already is an ARRAY_SIZE() macro defined in kernel.h for general
use, there's really no reason for this to be here.

diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index ab871e0..36508ea 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -156,8 +156,6 @@ static const struct block_device_operations drbd_ops = {
 	.release = drbd_release,
 };

-#define ARRY_SIZE(A) (sizeof(A)/sizeof(A[0]))
-
 #ifdef __CHECKER__
 /* When checking with sparse, and this is an inline function, sparse will
    give tons of false positives. When this is a real functions sparse works.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


More information about the drbd-dev mailing list