lkml.org 
[lkml]   [2019]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] btree: Remove custom MAX macro
Date
The btree implementation defines its own MAX macro, whilst also
including kernel.h, which already defines a max macro. This removes the
custom implementation in favour of the standard one provided in kernel.h

Signed-off-by: Harry Jeffery <me@harry.pm>
---
lib/btree.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/btree.c b/lib/btree.c
index b4cf08a5c267..4b5968b6167b 100644
--- a/lib/btree.c
+++ b/lib/btree.c
@@ -43,8 +43,7 @@
#include <linux/slab.h>
#include <linux/module.h>

-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define NODESIZE MAX(L1_CACHE_BYTES, 128)
+#define NODESIZE max(L1_CACHE_BYTES, 128)

struct btree_geo {
int keylen;
--
2.23.0
\
 
 \ /
  Last update: 2019-09-26 23:37    [W:0.027 / U:2.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site