Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] [PATCH] DRBD:  Delete superfluous defn of "ARRY_SIZE".
@ 2010-03-09 12:44 Robert P. J. Day
  2010-03-09 14:50 ` Lars Ellenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2010-03-09 12:44 UTC (permalink / raw)
  To: drbd-dev


Signed-off-by: Robert P. J. Day <rpjday@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
========================================================================

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Drbd-dev] [PATCH] DRBD: Delete superfluous defn of "ARRY_SIZE".
  2010-03-09 12:44 [Drbd-dev] [PATCH] DRBD: Delete superfluous defn of "ARRY_SIZE" Robert P. J. Day
@ 2010-03-09 14:50 ` Lars Ellenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ellenberg @ 2010-03-09 14:50 UTC (permalink / raw)
  To: drbd-dev

On Tue, Mar 09, 2010 at 07:44:36AM -0500, Robert P. J. Day wrote:
> 
> Signed-off-by: Robert P. J. Day <rpjday@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]))


Wow.
Thats a leftover from 2001 ... linux-2.4.4 days.
And even then it was unused, and the ARRAY_SIZE macro
was already in linux/kernel.h 

 ;-)

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-09 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 12:44 [Drbd-dev] [PATCH] DRBD: Delete superfluous defn of "ARRY_SIZE" Robert P. J. Day
2010-03-09 14:50 ` Lars Ellenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox