Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1045220pxx; Thu, 29 Oct 2020 23:51:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5GgUo0HJT9lTfiZ0/qS5BfLc3NQEtAav5RZJY9pTrOzQgicgNJ5WoMRAZdMnwtwykAOFY X-Received: by 2002:a17:907:7083:: with SMTP id yj3mr1094618ejb.175.1604040705081; Thu, 29 Oct 2020 23:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604040705; cv=none; d=google.com; s=arc-20160816; b=C2BAcuJsc7uQeebNiUBqnmtEb0a+OlGTh0VwOG5x+yeBSWnYSJ3yCclFLzezFUhbvd UM1ACMqoP2ZXohZxo3inQe3qRedzIyZM1BQ7x6ju8GddMN4OJsYUy6Bj0zMEhBS+iHpf ruJKPw6izwCdo3/tschpGprwLRyygTjHMCAG8H23xihCtopjoyB4UxsrZJ9LDVDMjq9P 3BmtwSSnjkIqtRS5zd07zBzc/QrW+Yh2HO/LnK44mMMYDukjlZfqlMg1c8Ai2D5ydE8G d3iZdXLmx222u/N6ohWSpESussIqkmugLNzmxEymTmzGnEAZjxPUEv7tIScA+zQaTH7x 78Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jQrTh3aJ8dIccf1mZYDOo3tG6COAfFYJ0okgVTp3jjA=; b=sNxjzLdD+8/r9DFNRLbPavMcwq3+C7v2KTYn4Dk5hv4kKxIU4MnO0kcYkyvSP6+dN/ SqQ2nRd9aOw1Zi22Lysg1GUOR1t4IbqRnwJNFVKB6Ua8oi6uf9nJzXznCcQ5dUP5HN1P svSXoCQX8Ym6bSgoE7t+xNV3jdOJajCwYk7urwvVCd+60+ZWGJQd32LovIrzP8zuY44D NbtAdGCTtM/8Q1N+9N7pHJMLj9WfEvSP+KvCGv0gkc/Yih0oAsuJJNZWXmGPEmwgszqZ 0WOUHc+TTZpLj1+JB9wdAaAapOjhJE49vFfhRNPOwrKW8W5nIKrVgKDUrNE0adlr4iPX 4YCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id da6si4035489edb.125.2020.10.29.23.51.22; Thu, 29 Oct 2020 23:51:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725780AbgJ3GvJ (ORCPT + 99 others); Fri, 30 Oct 2020 02:51:09 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:60530 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbgJ3GvI (ORCPT ); Fri, 30 Oct 2020 02:51:08 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kYOFZ-0004uJ-AU; Fri, 30 Oct 2020 17:51:02 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 30 Oct 2020 17:51:01 +1100 Date: Fri, 30 Oct 2020 17:51:01 +1100 From: Herbert Xu To: Tianjia Zhang Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: sm2 - remove unnecessary reset operations Message-ID: <20201030065101.GH25453@gondor.apana.org.au> References: <20201015092441.12939-1-tianjia.zhang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201015092441.12939-1-tianjia.zhang@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Oct 15, 2020 at 05:24:41PM +0800, Tianjia Zhang wrote: > This is an algorithm optimization. The reset operation when > setting the public key is repeated and redundant, so remove it. > At the same time, `sm2_ecc_os2ec()` is optimized to make the > function more simpler and more in line with the Linux code style. > > Signed-off-by: Tianjia Zhang > --- > crypto/sm2.c | 75 ++++++++++++++++++++-------------------------------- > 1 file changed, 29 insertions(+), 46 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt