Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp446328ybm; Thu, 28 May 2020 06:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAW4tuGQHi31e5no6a6f8mmK7QocYycbTg7AlvGAb+NLvRqCucrvla81GBBxIbYDMW76NX X-Received: by 2002:a50:a602:: with SMTP id d2mr3439362edc.112.1590674164606; Thu, 28 May 2020 06:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590674164; cv=none; d=google.com; s=arc-20160816; b=1APkscxynHFFjvljcQ06NO+aCu9M7ytMa1e/q3LWMtvdXwGmN1hurrP1lHdjx9kufZ +VEZiONT2lWZsvUZJ9JTklyneb/mLo6uyvjRyddLeEosYlSDUWU4yBh/m8gnTt8a09ng Si8VF7HXg/pR/LTBm0dYDKr9FsvqdQzPyyqkKY11JNx80QiY/NZiaqr8iUz8oeZ3GZcb wmNaYIf7IAFDaJs+2jYkanvF5vPxOUDSB/zkO+P0lMISjTOYJWwS4evcbuZK0dk7l40i PFXa/WvHtaRTG2ffsORMZf3OH6ZN2fpr7ndbASfTcWYN5jeHYYGUnpA8gK/UW2T+X0Ah uC9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=5OnIIKG0C7CFlP6JCjmB+4YqT0QfzHo71bblBDUpTuM=; b=xd+ZkmWSRGkTC6evKA/QABP53O/YeXJ70EC2nYxmVRWJ8a1IdzS9o9YvKcJq8vJMWk zAe2oeU8vx9V9D9Kapt2sNq7dCnV4XfJcjlu7rr5vIVw8mhukc1sQtVEKe2H7578SiRc CJkp94rjArcUgSoKrHd1KOm5oWtpG4wznkSNrFWu5su9SuutzooJErJChu74wZYohMVN f1/C3JWy+ieWvXQKeCBdzPFJe7rVdYpwPdrfkoVq9yLn4UerZSpTDs2obt+Baje/9EYM ruT8q/dd6vdzkXneb4gYL5RjZ1/o8LYTD6wh9GqMdolDHQhii4+NbPg3Pl15hGtdU3iT dI3g== 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 c4si3611820edg.353.2020.05.28.06.55.41; Thu, 28 May 2020 06:56:04 -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 S2390800AbgE1NxE (ORCPT + 99 others); Thu, 28 May 2020 09:53:04 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5381 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390606AbgE1NvE (ORCPT ); Thu, 28 May 2020 09:51:04 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 56A3D8C3420CE5161ED8; Thu, 28 May 2020 21:50:59 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 28 May 2020 21:50:50 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 06/12] net: hns3: modify an incorrect type in struct hclgevf_cfg_gro_status_cmd Date: Thu, 28 May 2020 21:48:13 +0800 Message-ID: <1590673699-63819-7-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590673699-63819-1-git-send-email-tanhuazhong@huawei.com> References: <1590673699-63819-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modify field .gro_en in struct hclgevf_cfg_gro_status_cmd to u8 according to the UM, otherwise, it will overwrite the reserved byte which may be used for other purpose. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h index f830eef..40d6e602 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h @@ -161,8 +161,8 @@ struct hclgevf_query_res_cmd { #define HCLGEVF_GRO_EN_B 0 struct hclgevf_cfg_gro_status_cmd { - __le16 gro_en; - u8 rsv[22]; + u8 gro_en; + u8 rsv[23]; }; #define HCLGEVF_RSS_DEFAULT_OUTPORT_B 4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 59fcb80..be5789b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -2403,7 +2403,7 @@ static int hclgevf_config_gro(struct hclgevf_dev *hdev, bool en) false); req = (struct hclgevf_cfg_gro_status_cmd *)desc.data; - req->gro_en = cpu_to_le16(en ? 1 : 0); + req->gro_en = en ? 1 : 0; ret = hclgevf_cmd_send(&hdev->hw, &desc, 1); if (ret) -- 2.7.4