[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 02 Feb 2023 12:21:41 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Peter Zijlstra <peterz@...radead.org>,
torvalds@...ux-foundation.org
CC: corbet@....net, will@...nel.org, peterz@...radead.org,
boqun.feng@...il.com, mark.rutland@....com,
catalin.marinas@....com, dennis@...nel.org, tj@...nel.org,
cl@...ux.com, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com,
svens@...ux.ibm.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
joro@...tes.org, suravee.suthikulpanit@....com,
robin.murphy@....com, dwmw2@...radead.org,
baolu.lu@...ux.intel.com, Arnd Bergmann <arnd@...db.de>,
Herbert Xu <herbert@...dor.apana.org.au>, davem@...emloft.net,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
Andrew Morton <akpm@...ux-foundation.org>, vbabka@...e.cz,
roman.gushchin@...ux.dev, 42.hyeyoo@...il.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-s390@...r.kernel.org,
iommu@...ts.linux.dev, linux-arch@...r.kernel.org,
linux-crypto@...r.kernel.org
Subject: Re: [PATCH v2 01/10] cyrpto/b128ops: Remove struct u128
On February 2, 2023 6:50:31 AM PST, Peter Zijlstra <peterz@...radead.org> wrote:
>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: Peter Zijlstra (Intel) <peterz@...radead.org>
>---
> include/crypto/b128ops.h | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
>--- a/include/crypto/b128ops.h
>+++ b/include/crypto/b128ops.h
>@@ -50,10 +50,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 */
>
>
Can we centralize these ordered types, too?
Powered by blists - more mailing lists