From patchwork Mon May 15 07:57:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 93963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6756823vqo; Mon, 15 May 2023 01:27:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nQJFO4Va4Rf2j4A58ixqsNNYs/3sTYdUBlvhKXei/oZFsOxP4VtGHVlPcfljIIV/UYVcB X-Received: by 2002:a17:90a:bc05:b0:24d:f8e6:9d4c with SMTP id w5-20020a17090abc0500b0024df8e69d4cmr31846260pjr.49.1684139241510; Mon, 15 May 2023 01:27:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684139241; cv=none; d=google.com; s=arc-20160816; b=NnGM/rtHC2j6Y4IvPCpWucPfZaqKb3L6faAriJGGyc6LWdlCmT/NSESXvS6mS/ttRO XowKs4H5wI3de3vxwx6LIBf9KodGyDLARis7GoOEhlOJNMoof+JmTL+fP2FQ2bjvTs+Q p+RpFoGE/n/4S5uwqjX+KqKQguilTFApKMbA5u3gqsbH6zg8/mSxkm6nhmQQHhk4WKzp d55yBOew16Jdy2CgEIOdmfKQ9z/LXospWfKCVpS3Fm+8WRkZzop949BlGfGIo9WNdIGQ EddkKMgqXOczynMnyMmL5ZPZgpgPCDFPzc4CAhIUknKZ3DwSzgHq0R/NeZRpw5HZJQXK JqUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=gp7OCKaBYjIIkPcuPMybL+ixdp/AdwhFq0MWXNBGUCo=; b=BrBngoewGLYQaxJdjjk4N4Uebfl5fkJfm7In7VEag2Nqac4zharw+69yQILoZUemb1 OiepLJdxWnl9nQcEYg7jJgUS9btTW19w4b9ETXfLhlAwOMsrJB5CawX1CB3yWttLZk3X JOgqW13l4Ytam1FrjPKjQAeA/mP76R0TyGfi8jeW7cyOdBx8vetPnGr/dUZO4qk5z2i5 2S54DwaZzbzPIQdLXx0lk5+p/gaWSyHdvKMi2Tzt3rtxXM91YyVrF5xfavciFZPUCw+a zEv55HrtOyEt5Uhx//yh+vXJfmQGuR4UIbxiz0AkrVHp4uOn/q625xR3O2jX+b+JSh+A QaWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="mfr/Lee6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id il5-20020a17090b164500b002504799a157si24225665pjb.134.2023.05.15.01.27.08; Mon, 15 May 2023 01:27:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="mfr/Lee6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233762AbjEOIHZ (ORCPT + 99 others); Mon, 15 May 2023 04:07:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjEOIHW (ORCPT ); Mon, 15 May 2023 04:07:22 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA211716; Mon, 15 May 2023 01:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=gp7OCKaBYjIIkPcuPMybL+ixdp/AdwhFq0MWXNBGUCo=; b=mfr/Lee6q6wb3hW9VLMJP6RMas nTl9Qe1+9Iu48xOQT4aXYKIo3YdHu4pVixS6ep5klWjn2Hleinv1VLcJZJw+35Dak53xO4M9X9KIK FpMiCIIAsi7/QgdKTHO+THopVLnjgnmza7zDZfiP5yT3vka2IQVSR4N/m/pdNqYPnTzsA8lIVgWqD P5m3mwC26ExmfD/meFO5f1ezwrEtuIohzrkIWoLo3mQANg3Hx3wLE8RBN4yr9HOkOwiYyEuNQ3/1W PLL/LI+1uLThBRAeCCPMwP+WHJ7vOYl/0orY1PoeN18xp4Y80oyboD7BypdwlKtzQ00oQnrhgh54F yIuqhB5w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pyTDk-00BQMy-1T; Mon, 15 May 2023 08:06:16 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0C5C8300786; Mon, 15 May 2023 10:06:10 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id AB37F202674A5; Mon, 15 May 2023 10:06:10 +0200 (CEST) Message-ID: <20230515080553.979680310@infradead.org> User-Agent: quilt/0.66 Date: Mon, 15 May 2023 09:57:00 +0200 From: Peter Zijlstra To: torvalds@linux-foundation.org Cc: corbet@lwn.net, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, mark.rutland@arm.com, catalin.marinas@arm.com, dennis@kernel.org, tj@kernel.org, cl@linux.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, joro@8bytes.org, suravee.suthikulpanit@amd.com, robin.murphy@arm.com, dwmw2@infradead.org, baolu.lu@linux.intel.com, Arnd Bergmann , Herbert Xu , davem@davemloft.net, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, Andrew Morton , vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH v3 01/11] cyrpto/b128ops: Remove struct u128 References: <20230515075659.118447996@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765947989770710484?= X-GMAIL-MSGID: =?utf-8?q?1765947989770710484?= 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) Acked-by: Herbert Xu --- 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 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 */