Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1884499pxk; Sun, 13 Sep 2020 20:59:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNXZ8Am23Js7zekMLZkuLBHFEdFQQ0RiT1owmmGdWMftTLt2IwCeCbByRCPvDvcxo6SMTG X-Received: by 2002:a17:906:2354:: with SMTP id m20mr12418279eja.341.1600055942818; Sun, 13 Sep 2020 20:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600055942; cv=none; d=google.com; s=arc-20160816; b=qjCtaheShAII+X2z1Oqg86b3y269AoVoXGa6CT0ckHDSwIYANABZa2M4DhE1Xtknx7 WkpIVDOHcTJK9rovmKWLv10whXUSH0LYfbW602yr2ORPS1RBxu7PwkE+aObEq+MeLGco wAloqyjpKE4kOGvNkzkRWaWfxGEVl4dLffD9AsOJWJpPu/B+h1rMK9N4qftSOHsk0olc zKx+LEE+vgCK3TTSSSMTETTx8AKg9WbdLTrs5G96TxQf/uIIqaEbZeAAlaBqwcknuadt Qs48DUkuwo1utA40B54E5TvxSPesnYuic7e/5KNQr9QoORV0tZlAV5Fy+o2nj9q5ThQP KUNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GCEDchJNw91qajTkj7IiudutflndBwR6G7lwXymsBsA=; b=nGeDC+44pU7pd3LUmjH8WwXPCopBASxXq1VEppBYeJ8inxqDHC/q+c4u3i6Yb40QgI XQa+hIquFT/WeAg+k5iLsIzT+YDlKsaIVKsJYghXfbbtcPmbNUfs20WUZ4K9R+umcT97 X5pIRqaMhb+Dk3/mKAU+3ZcF26sRrSnpd9S0yuXsAZkC03fkQ9bCXVXkxoViW2okbGlt 4cVj2eU8R7MHtU+vdJoElaoEGSTO2OsddYD1AZGrSOdV2G6MGPKLDeqGkAZqzWrqRPT9 XpHVEbHnw1urXLMw2KbiAijfMZGHnnux6OzqJBndH167VSfOMEdnHg0CnoSp0e/zyECM JLBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 da1si6826339edb.102.2020.09.13.20.58.40; Sun, 13 Sep 2020 20:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726010AbgINDzo (ORCPT + 99 others); Sun, 13 Sep 2020 23:55:44 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35260 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726009AbgINDzV (ORCPT ); Sun, 13 Sep 2020 23:55:21 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 47903B950912B593501C; Mon, 14 Sep 2020 11:55:16 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 11:55:08 +0800 From: Liu Shixin To: David Howells , Jarkko Sakkinen , James Morris CC: , , , Liu Shixin Subject: [PATCH -next] dh key: convert to use be32_add_cpu() Date: Mon, 14 Sep 2020 12:17:47 +0800 Message-ID: <20200914041747.3701948-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). Signed-off-by: Liu Shixin --- security/keys/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/keys/dh.c b/security/keys/dh.c index 1abfa70ed6e1..2635cb8a4561 100644 --- a/security/keys/dh.c +++ b/security/keys/dh.c @@ -186,7 +186,7 @@ static int kdf_ctr(struct kdf_sdesc *sdesc, const u8 *src, unsigned int slen, dlen -= h; dst += h; - counter = cpu_to_be32(be32_to_cpu(counter) + 1); + be32_add_cpu(&counter, 1); } return 0; -- 2.25.1