* [PATCH 1/2] lib/btree: Kill unused MAX macro
@ 2010-05-12 21:17 Denis Kirjanov <kirjanov@gmail.com
2010-05-13 20:24 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Denis Kirjanov <kirjanov@gmail.com @ 2010-05-12 21:17 UTC (permalink / raw)
To: joern; +Cc: linux-kernel
Kill unused MAX macro
Signed-off-by: Denis Kirjanov <kirjanov@gmail.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))
#define NODESIZE MAX(L1_CACHE_BYTES, 128)
struct btree_geo {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] lib/btree: Kill unused MAX macro
2010-05-12 21:17 [PATCH 1/2] lib/btree: Kill unused MAX macro Denis Kirjanov <kirjanov@gmail.com
@ 2010-05-13 20:24 ` Andrew Morton
2010-05-14 17:03 ` Jörn Engel
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2010-05-13 20:24 UTC (permalink / raw)
To: kirjanov; +Cc: joern, linux-kernel
On Thu, 13 May 2010 01:17:24 +0400
"Denis Kirjanov <kirjanov@gmail.com" <kirjanov@gmail.com> wrote:
> Kill unused MAX macro
>
> Signed-off-by: Denis Kirjanov <kirjanov@gmail.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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] lib/btree: Kill unused MAX macro
2010-05-13 20:24 ` Andrew Morton
@ 2010-05-14 17:03 ` Jörn Engel
0 siblings, 0 replies; 3+ messages in thread
From: Jörn Engel @ 2010-05-14 17:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: kirjanov, linux-kernel
On Thu, 13 May 2010 13:24:34 -0700, Andrew Morton wrote:
>
> 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.
Ack. I'm currently on vacation, so it will have to wait until next
week.
Jörn
--
Unless something dramatically changes, by 2015 we'll be largely
wondering what all the fuss surrounding Linux was really about.
-- Rob Enderle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-14 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12 21:17 [PATCH 1/2] lib/btree: Kill unused MAX macro Denis Kirjanov <kirjanov@gmail.com
2010-05-13 20:24 ` Andrew Morton
2010-05-14 17:03 ` Jörn Engel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).