linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btree: Remove custom MAX macro
@ 2019-09-26 21:34 Harry Jeffery
  2019-09-26 22:15 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Harry Jeffery @ 2019-09-26 21:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Harry Jeffery

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


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

end of thread, other threads:[~2019-09-26 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 21:34 [PATCH] btree: Remove custom MAX macro Harry Jeffery
2019-09-26 22:15 ` kbuild test robot

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).