Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp399029ybm; Thu, 28 May 2020 05:49:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfNqOI5r9P8xug2I95FAvgk2cbhv7B7QWTRIuHTEilCW+sBkFDQNoNXTzyzGEVoec4Kty3 X-Received: by 2002:a17:906:94d5:: with SMTP id d21mr2768110ejy.342.1590670144547; Thu, 28 May 2020 05:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590670144; cv=none; d=google.com; s=arc-20160816; b=vHN1UDjokDFOPfmldn9m2mTUPdRQtscUl/TxB7rCloEI4704Isy6ARHTW29C0ZS5Oc xPeolfYetdpmVsVKlWeMGFug5fDtc2AJzbv0DZb9SMIeTjw8VASS4BsQFnTIiXX+kXDj swM327fC2vPDvTLPwEe6B96h13FjauRTIRmj2L+A2osO16kjfiVAKJMiYYcFTqAqnYMw XAg/IQdgPW+BeBKjT+HSDlxIWleKkRYHAYmlIE+quJNIYlmu7NGeBC8o9hMkmgklPYCa yVqX6iUpy6T0gkkYZc9uaPYT0LvTqWzf+pPI+CrqHLHXPN9BhO4qGYgtfhwcAWMPn8/L lgQA== 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=VywlKnWyIW7kd4XUJYjOtqI0R5SyJqPMj7cS7Alzf7oubieqfm1gJtDeVWGpFwsnXk +2IItzMpzBNK+f9BQGYFyGT52QfPorHzERZL4sfwYWNvDjemGsJkyV8IDy6i29C31FIT DBmlMIh6VrqDpbg2PDIzanMv50D5nc43ZmK0rrdlqFJU1vrBjtsPECLePSrM8PsfQy+f 8hmBEZErT0c/DB7JQAZXqF6B354/9zBj13F9Lg+D46zp6zPL3jmfpN5ie7K0ixGbxHaz 0tbfDQE/h7KZD2d8kBMY69kAltu7cVWFgOD6l9vqNPelGbGBa+79kBdXhGNUNcCFuKBy xjKA== 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 y1si3604436edo.418.2020.05.28.05.48.41; Thu, 28 May 2020 05:49: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 S2389889AbgE1Mqv (ORCPT + 99 others); Thu, 28 May 2020 08:46:51 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5362 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389866AbgE1Mqr (ORCPT ); Thu, 28 May 2020 08:46:47 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 42CD785ABCF260CFBA04; 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:37 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 05/11] net: hns3: modify an incorrect type in struct hclgevf_cfg_gro_status_cmd Date: Thu, 28 May 2020 20:45:06 +0800 Message-ID: <1590669912-21867-6-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 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