Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp444857ybm; Thu, 28 May 2020 06:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4XZSmlI8eBhHUXnZnmz6LHn7MudN8KldHo8YEfQGxcD6u0bmpW3grEusadNhTlHtEgNwY X-Received: by 2002:a05:6402:5:: with SMTP id d5mr3277652edu.247.1590674029876; Thu, 28 May 2020 06:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590674029; cv=none; d=google.com; s=arc-20160816; b=h91W1QU4X1QYHIwly9kX6rsxd3ScY3fD0OLTpCt3Nl2G0HrcJgd7SFTwn0Qjgo38Lk 8TNzQx2Lkhv2JxcdwjuIegHZPFMjacg3LNQM5VdV2gucjGvPLOG9+T9MJ0zxEVRsRlUa uh0DuGJOWDakYyAXjUXBmPQNEn9bVHI/DiGls9f8XfN+7Yt60mv2oEIwDQgJRD2YGktB 2i93xhgK3RhOj1TpT9l8UCfBbm/SvvpFKrI6hlY9qDHG7XqBQgAdqvvhejiY8ySDkXBK TKROKU+2sjAsYsg4+qOgonb9Hog/kENOemo8LDeNTkZP+FXnNhl2e1KEmcq4ZYu6bq/u us0g== 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=uCL1HNdFg+XonMHhFL+PxswX+Wyn53CwMTHIzXSRzAU=; b=OstJJhiB4T5XxK4+An8veBWST0xWzLU4LGZuuADzOdJ+EHCD/R+euzzDkRbrRyaV8h DxdLptrjntVmlXpOLRu89ohiGWIc4yfQjhNF0zer4dxtttjDGOec/0LFxwfdZ2dbE+mM GW9oRgw8n9wqHIIS7n3Em7xpx9FmhOzBTC6qJSas5mOkXpdQGqGICWbU1rDH+ad6xh9y xf1hwrf3cAX5z/DV1YsXs+0XtMRMDNU/7dktP7opooRiyYCAwux+3ucabXYipPRPGzwX 5YGSuoTZj/IoIAtTlG2EbwSU1S3WHgIPgtjYmZfRl+lVBx0EHW7eSpN09DY5e9ouSBUs 0bKQ== 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 mj15si3787671ejb.404.2020.05.28.06.53.26; Thu, 28 May 2020 06:53:49 -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 S2390673AbgE1NvY (ORCPT + 99 others); Thu, 28 May 2020 09:51:24 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5374 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390534AbgE1NvC (ORCPT ); Thu, 28 May 2020 09:51:02 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 367BFE212A58D6ED24D0; 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 05/12] net: hns3: modify an incorrect type in struct hclge_cfg_gro_status_cmd Date: Thu, 28 May 2020 21:48:12 +0800 Message-ID: <1590673699-63819-6-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 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 e9b0e1c..1e4f285 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