Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp400307ybm; Thu, 28 May 2020 05:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9A+oS/frFJx9le0ktdTDVVroMeh+FmB0z7/1rbiAtd3UKLxy0sWkKd52bj7Ng+ol+lyWX X-Received: by 2002:a05:6402:1c1e:: with SMTP id ck30mr2887945edb.154.1590670246942; Thu, 28 May 2020 05:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590670246; cv=none; d=google.com; s=arc-20160816; b=Oya0rofCsN+TlKespQYHhurNe9E113KSDkyIdGbJrcd2Do31gkP4aBe9tRwezwdEJq AKZm4FIw0Hg+ygGE4jj9F9TeRu3plm6Tzc/tz4yPq/GUC4zH95XCE0Z8tMFA+kdNXchl G9vSiRQVbNIYOeGwtlOmfErrE8EvlfV/o2c7mHpAn0JrXArf0Gk8CvO1Y6jOD5P2vL6M vixdTKuNTD3bgCh0IPpW42zjRJ77ZxxRzcloR4zVRu6QBlgO9quIWZQCOkoDG6PW/tuV 73nU5Ui9/wzJ+gUzMQ84wenzk8SgcPeNBRQ5ZmgysSyVPZWNG7IrkCASpYlNzTtqChSI l0Pg== 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=q4JFxeqUz/HTieJWk9xdsL/73jyqyJ4FLA6b3jWGUIQ=; b=Ix8QIzlSJZ6p58fudFLHDBO8GTzrobeNQzauwP2h47ntCnyknXAdef7LREj4UJGWWd 7dsyprJuIqlxhARNom9oXrqjSjPwHUC8OhT0FvVFIZo2h06qvKA11vvxasz0wq7cgwxS JiPP+76DzhjX578Zk/eqKdZ9b3CAXGhthtszV2E5Jj9EP40Y6EQulvB8wK5lRFWTdVPo +Zba1sPJHCkmOzcFAffFiK7EvHiDSsXSNXYnzmEWT+m8lG1O4fskXgLo0PPMe2wbw/Mp onzTdI3gvnEZtLBT0qD0fh0GbLQ+bTdqAfNRsI7WDM+gQbqvpy467sNUGhKpvRxDwQpB Worg== 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 i8si3889566ejj.264.2020.05.28.05.50.24; Thu, 28 May 2020 05:50:46 -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 S2389954AbgE1Mrs (ORCPT + 99 others); Thu, 28 May 2020 08:47:48 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:53518 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389827AbgE1Mrq (ORCPT ); Thu, 28 May 2020 08:47:46 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 665B7D89C7569B9AB143; Thu, 28 May 2020 20:46:43 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 28 May 2020 20:46:36 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 04/11] net: hns3: modify an incorrect type in struct hclge_cfg_gro_status_cmd Date: Thu, 28 May 2020 20:45:05 +0800 Message-ID: <1590669912-21867-5-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590669912-21867-1-git-send-email-tanhuazhong@huawei.com> References: <1590669912-21867-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 hclge_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/hns3pf/hclge_cmd.h | 4 ++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h index e3bab8f..463f291 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h @@ -884,8 +884,8 @@ struct hclge_cfg_tso_status_cmd { #define HCLGE_GRO_EN_B 0 struct hclge_cfg_gro_status_cmd { - __le16 gro_en; - u8 rsv[22]; + u8 gro_en; + u8 rsv[23]; }; #define HCLGE_TSO_MSS_MIN 256 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 6c84413..87473f7 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1456,7 +1456,7 @@ static int hclge_config_gro(struct hclge_dev *hdev, bool en) hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_GRO_GENERIC_CONFIG, false); req = (struct hclge_cfg_gro_status_cmd *)desc.data; - req->gro_en = cpu_to_le16(en ? 1 : 0); + req->gro_en = en ? 1 : 0; ret = hclge_cmd_send(&hdev->hw, &desc, 1); if (ret) -- 2.7.4