[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100513132434.3b1515fa.akpm@linux-foundation.org>
Date: Thu, 13 May 2010 13:24:34 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: kirjanov@...il.com
Cc: joern@...fs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] lib/btree: Kill unused MAX macro
On Thu, 13 May 2010 01:17:24 +0400
"Denis Kirjanov <kirjanov@...il.com" <kirjanov@...il.com> wrote:
> Kill unused MAX macro
>
> Signed-off-by: Denis Kirjanov <kirjanov@...il.com>
> ---
> diff --git a/lib/btree.c b/lib/btree.c
> index 41859a8..f833949 100644
> --- a/lib/btree.c
> +++ b/lib/btree.c
> @@ -45,7 +45,6 @@
> #include <linux/slab.h>
> #include <linux/module.h>
>
> -#define MAX(a, b) ((a) > (b) ? (a) : (b))
It's used on the very next line:
> #define NODESIZE MAX(L1_CACHE_BYTES, 128)
And we cannot use max() here because it's evaluated at compile-time.
Also, this reader is quite unable to determine why this forumation for
NODESIZE was chosen. As few kernel programmers can read Joern's mind,
I'd suggest that a code comment is in order.
--
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