Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1883802pxk; Sun, 13 Sep 2020 20:56:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYC2SqoBSxub4YUHjEkifPU7nO88KPjJwJ6f16lvShUNdpJrBY/9uxlnSdX0fCONHvImRi X-Received: by 2002:a17:906:4cc2:: with SMTP id q2mr419394ejt.422.1600055803859; Sun, 13 Sep 2020 20:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600055803; cv=none; d=google.com; s=arc-20160816; b=PRLBXRwFvfLsIIT8HU/GXQ4gGiq3y7RGaw9mjGuXOBqwjHgrNk4KHk6t18XuX3gSdE Wao8vVJ9fYbwmsYB+A2Sq81DZKLLgcta5OUx9aAjov2GcZbwM3gfMW8JxkZR4E5BPuPy TUqqQlVS9MO2mB3ivPWaUY5c2flXkOrb7GKWfm2D2IbFJz9lV6aPUWl/NWquboQTFWjI VT3vSLYaETO8tU0/n/10k8Fptx7EFrvBdXSoJpsfRZBuaSsqQH4rgFnKlICx/PsHYaYI YC07P4ldUQtymjX2Fd735jxXyL7WDzWgIYR4S4E2hNC88GiH5fk1/5JGD2xYCwfqnwEF ivQQ== 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=Hau3SF6rmL4LvQZ1kJVq7q61S2a5ead/0pbYEXsqQtc=; b=kvmsE0Ayh7Y6/C/ZTrOiK4FWQTwZmHpKflbpAu78Je2pb2PKCAUOdBy2LfPaG+9AIS b4r2UklMSM2dWuSLTxO8AV2FL7/9f/1775XvzkQbjP09yQgoQ0+Fy9N+boZzBZpJjRFg PhpKRcUBXeNSWvxVpGRg9rdY+X3ql1E+A60pIrym5vRAuWYIXHFZupH1A1Y8hlXBJf/i jTufWJgkFXvhy89atWVy5BxmJ4Ydrl7+7OXwmskhL6Zk59VsDLzPkiDGpjZ5Iaq8+A5L ppFjLo5cK8s5+2cEyWD7uUVRPqc+lwHBjQpHINYKnWTYJwfbaC9qic38yjxIKCWw6oF9 2YJw== 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 p15si2771167ejm.293.2020.09.13.20.56.21; Sun, 13 Sep 2020 20:56:43 -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 S1726025AbgINDzV (ORCPT + 99 others); Sun, 13 Sep 2020 23:55:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35254 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725965AbgINDzS (ORCPT ); Sun, 13 Sep 2020 23:55:18 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 42BE948726F22B358724; 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:09 +0800 From: Liu Shixin To: Alasdair Kergon , Mike Snitzer , CC: , Liu Shixin Subject: [PATCH -next] dm integrity: convert to use le64_add_cpu() Date: Mon, 14 Sep 2020 12:17:49 +0800 Message-ID: <20200914041749.3702000-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_le64(le64_to_cpu(E1) + E2) to use le64_add_cpu(). Signed-off-by: Liu Shixin --- drivers/md/dm-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 3fc3757def55..cf9dadd55625 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -3696,7 +3696,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error) retest_commit_id: for (j = 0; j < i; j++) { if (ic->commit_ids[j] == ic->commit_ids[i]) { - ic->commit_ids[i] = cpu_to_le64(le64_to_cpu(ic->commit_ids[i]) + 1); + le64_add_cpu(&ic->commit_ids[i], 1); goto retest_commit_id; } } -- 2.25.1