shithub: riscv

Download patch

ref: 521281c4ce23a8b69ca7c30d5c852e18d6847912
parent: acd2079ebf458c20ad5b3e5504c00a92d5fe46f1
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Feb 24 15:09:13 EST 2025

gefs: remove dead code

--- a/sys/src/cmd/gefs/dat.h
+++ b/sys/src/cmd/gefs/dat.h
@@ -346,7 +346,7 @@
 	vlong	gen;
 };
 
-struct Key{
+struct Key {
 	char	*k;
 	int	nk;
 };
--- a/sys/src/cmd/gefs/hash.c
+++ b/sys/src/cmd/gefs/hash.c
@@ -31,26 +31,8 @@
 #include "dat.h"
 #include "fns.h"
 
-#define _le64toh(x) \
-	GBIT64((char*)&x)
-
-
-#define ROTATE(x, b) (u64int)( ((x) << (b)) | ( (x) >> (64 - (b))) )
-
-#define HALF_ROUND(a,b,c,d,s,t)			\
-	a += b; c += d;				\
-	b = ROTATE(b, s) ^ a;			\
-	d = ROTATE(d, t) ^ c;			\
-	a = ROTATE(a, 32);
-
-#define DOUBLE_ROUND(v0,v1,v2,v3)		\
-	HALF_ROUND(v0,v1,v2,v3,13,16);		\
-	HALF_ROUND(v2,v1,v0,v3,17,21);		\
-	HALF_ROUND(v0,v1,v2,v3,13,16);		\
-	HALF_ROUND(v2,v1,v0,v3,17,21);
-
 #define rotate_right(v, k)\
-	((v >> k) | (v << (64 - k)))
+	(((v) >> (k)) | ((v) << (64 - (k))))
 #define read_u64(ptr) \
 	(*(u64int*)ptr)
 #define read_u32(ptr) \
--