Received: by 10.213.65.68 with SMTP id h4csp889107imn; Fri, 23 Mar 2018 20:05:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELs0oJhc/rkKsw6v0739s/dKmui0OFu/TE8M5s+y3XIj+VzlpnSqSwPBK9ARHe34SI0RsPCP X-Received: by 2002:a17:902:20cb:: with SMTP id v11-v6mr1886841plg.82.1521860742852; Fri, 23 Mar 2018 20:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521860742; cv=none; d=google.com; s=arc-20160816; b=fX8/81Osl5gkknjpYPAfL4nnPys3ejID84cEx0aIzHu+1oZCuMSQdFEw4lyJ7wcn3u mG7DXsCLAm/75hUn+0AZzDxVngcE5sOMYxkKXA2pQsqsF38ImLlHUvSJJg9bBj8xoBT8 2OCDOWmQ4IhjOu4LvxdOHVxW+EvS5RaVg9bdeAohf19BMAr6szX3apmJSEaOZTEm5L2V ItknILwocX4l6jBXzqd7f3C0MScgxij8AP6HomzQ3Wtpi4oq5N7zTs/iyfGL4XS6+Avn WLPUpu69bvtO0EWt5jV8d8cPBgyxkeKvYorQJgb99z4ktIXbhsZ950GrVU9ELeQAkUy4 3a0g== 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:arc-authentication-results; bh=QeBuHJyvAB8Q7nHaiF2J7g1nXsRS9MxnJ5TqyxYg4B8=; b=fpwCLUhQZb8JnwNtiSi37ZY7Q4bRB30y3vXK3MW/78i0QLTHM4zKrgKWIhV9WwVsM7 2prMbQJ2TaWac0+0GzNfJ+o2sfdd9K6mO5Pdg+h0wLTJhoJhVIWO4CWGAzbUo/phMHHP JUJVDkqb2cO9Ctvs3mWQGMyJa4+78K9FWHOPYVe1z/ibtYDRJmAOksYF8AM/AyiJmOhM 8G8uJ2L49F94sM9QqhzQyU43j/gMdYvwzbaQkvCmFTwlISKnKsNND7K4LIGqpVK9eDEz 6lJpoNZE5u+P4JKpf8kcq4/dVAzQE2GaQgdWL9QPRDXcYhHxIzajj/falWyK7TizB/1a 3rzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si6777188pgq.743.2018.03.23.20.05.28; Fri, 23 Mar 2018 20:05:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbeCXDBO (ORCPT + 99 others); Fri, 23 Mar 2018 23:01:14 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6701 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752008AbeCXDBN (ORCPT ); Fri, 23 Mar 2018 23:01:13 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 558B31D570DB3; Sat, 24 Mar 2018 11:00:59 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.361.1; Sat, 24 Mar 2018 11:00:51 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 1/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size Date: Sat, 24 Mar 2018 11:32:43 +0800 Message-ID: <1521862367-111399-2-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521862367-111399-1-git-send-email-lipeng321@huawei.com> References: <1521862367-111399-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang The return type of hns3_get_rss_key_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 9d07116..ac523c9 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -638,7 +638,7 @@ static u32 hns3_get_rss_key_size(struct net_device *netdev) if (!h->ae_algo || !h->ae_algo->ops || !h->ae_algo->ops->get_rss_key_size) - return -EOPNOTSUPP; + return 0; return h->ae_algo->ops->get_rss_key_size(h); } -- 2.9.3