Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1883830pxk; Sun, 13 Sep 2020 20:56:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxliWPWku0FxuaquoaKsPV4hpza9Db47DRZtr4UQIiId9/9KIY1+CmAasPrzJvbPApDU9sY X-Received: by 2002:a05:6402:209:: with SMTP id t9mr15889592edv.208.1600055808435; Sun, 13 Sep 2020 20:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600055808; cv=none; d=google.com; s=arc-20160816; b=kHqbdT3nd+xAG8+URgyQxQDUTIqAAYNgdDd6UoFvhWJdxRtbannfAgTQg/ty+nROYh 1an49bhjL8+LLD0qqyBYewMPOY31rQRltMB5GU/hcUrF7ckE7faIT+y4r3DOJ1pT5uxH L+X4SbxgXdmw/tknp46DFqKp8KCPd+CJXVrUAo/Kx2uR30WrIC5aPig5pjzpuoYUVsox n2mwCZdasNcJIsTvDi9FY+qxYDl55s82agX5R9wOjkjZ/s8rPJesm4NPUgPPa3GB0fUE I9i8NgPo79yqh4EPyPKGJv4o8uIztxLD+S0Tfe6U1/LldjdW++wPY2AzvjjuEyBQXEPK niXQ== 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=4lObRuNpx9KrAgQHVllOyTW+qQGBMs8Hbn3iO1GFwvc=; b=ZHJcj/JfxWOamjeD+2Ap3jiuGL9OjKJ5w1nO1b8z++h8LosM4hnGkJgXD6QfGBTsDW As7vaub7EDJk8C/fO26jHU8vgJP+ap9wYabTqW18D/CtvJOIzrGGMXjc4T7d1hsRvsWH kNRtd/tBSAKMAeTY/q5cVTi2QwnSAggebruUP48947ATDwibkHLt5Vp5+fRmVvw6QYa/ NpI5XcH99AzfenwOwIUFLUbD7I4wu2XsNV4JZrKxsF9UJxL3RYXiK6tuoaFbLJH2ZWei Pi8AHoezk289RiXS42HhzrDpmt4mmYrO/iFYXY86lX8Iq+RiB4QxVh7Xx5eLbv+k99Du 9nUQ== 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 nu23si5931409ejb.577.2020.09.13.20.56.26; Sun, 13 Sep 2020 20:56:48 -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 S1726058AbgINDzk (ORCPT + 99 others); Sun, 13 Sep 2020 23:55:40 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45110 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726010AbgINDzV (ORCPT ); Sun, 13 Sep 2020 23:55:21 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6A42718915B87E4F904A; Mon, 14 Sep 2020 11:55:17 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 11:55:11 +0800 From: Liu Shixin To: "David S . Miller" , Jakub Kicinski , Felix Fietkau , Lorenzo Bianconi , Kalle Valo , "Matthias Brugger" CC: , , , , , Liu Shixin Subject: [PATCH -next] mt76: mt7915: convert to use le16_add_cpu() Date: Mon, 14 Sep 2020 12:17:50 +0800 Message-ID: <20200914041750.3702052-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_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Signed-off-by: Liu Shixin --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index ac8ec257da03..8f0b67d0e93e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -714,8 +714,8 @@ mt7915_mcu_add_nested_subtlv(struct sk_buff *skb, int sub_tag, int sub_len, ptlv = skb_put(skb, sub_len); memcpy(ptlv, &tlv, sizeof(tlv)); - *sub_ntlv = cpu_to_le16(le16_to_cpu(*sub_ntlv) + 1); - *len = cpu_to_le16(le16_to_cpu(*len) + sub_len); + le16_add_cpu(sub_ntlv, 1); + le16_add_cpu(len, sub_len); return ptlv; } -- 2.25.1