Commit f413e724 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

cyrpto/b128ops: Remove struct u128



Per git-grep u128_xor() and its related struct u128 are unused except
to implement {be,le}128_xor(). Remove them to free up the namespace.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20230531132323.314826687@infradead.org
parent 4c8a4924
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -49,10 +49,6 @@

#include <linux/types.h>

typedef struct {
	u64 a, b;
} u128;

typedef struct {
	__be64 a, b;
} be128;
@@ -61,20 +57,16 @@ typedef struct {
	__le64 b, a;
} le128;

static inline void u128_xor(u128 *r, const u128 *p, const u128 *q)
static inline void be128_xor(be128 *r, const be128 *p, const be128 *q)
{
	r->a = p->a ^ q->a;
	r->b = p->b ^ q->b;
}

static inline void be128_xor(be128 *r, const be128 *p, const be128 *q)
{
	u128_xor((u128 *)r, (u128 *)p, (u128 *)q);
}

static inline void le128_xor(le128 *r, const le128 *p, const le128 *q)
{
	u128_xor((u128 *)r, (u128 *)p, (u128 *)q);
	r->a = p->a ^ q->a;
	r->b = p->b ^ q->b;
}

#endif /* _CRYPTO_B128OPS_H */