Received: by 10.213.65.68 with SMTP id h4csp887894imn; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvxW0XtOurKZ24/A6Eqe392woIJRKXrndXBC5o78+C+JDg2SoncNteR1Zs/hCp4R4JXwajw X-Received: by 2002:a17:902:8483:: with SMTP id c3-v6mr28970278plo.156.1521860618340; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521860618; cv=none; d=google.com; s=arc-20160816; b=wBXKYRxNZIW+Uw15BSould9S8dzOMib8LQVDHUbbqKQhpxSKi3Uqj7eiKce2nLGQE6 v9/rdSdJC6/gHySeyh7Q6LPpCV5ypoe/Jq89Ommynvtec3pwUBpxwfmnolN0BNyX9GQb sdSKdsHCfqEZQ/s0BTqp/2OQAiOup/Y7OKl93r3tOPjsspW61Q1P3aJ6kg5NPbVDpWsh dFaU0hDrhy3fT8rInzT90jpm8gv6wDbz2JCJV5nwYUVconys7hmmdyjpoAIx5J0yuXEI QYOYf0gEqwttXOgzuskujR6WlpqrM/PnaYk+MrLAY0shJg0hwMGg0O4aFAKp8vHT3ZiF mtig== 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=Npc/ZxmZ17L1+eaVfCCkG47SdT1wkWp2zSSWoK6bUFo=; b=h6T7+zkmKQTJ/eFFvgBkbeqkFGhALNa1CrgK0gz8UYAHtKjSU74kKeL8wWaOPBQQL/ MjNqvqfdCxnUf8SOWFAuJ5XG3uf0ydmslvFtPbX5+mDnFkuarsfnCwqd7ubnj++CHji7 tSHKytsb/FHZvDr0jSs0DAW7sE3ofyFuMvLcfXdmIl+XA23zzVvyM3d4T6hyn5QHfj+c fX3GYyrH35DQP3dXOGogPvhGI4B+cmLJg1KAbKZ1aM+oRfw8KfG5xF9MGX+Ean79g1I+ VXvR9tZ32NUlXtmpFKLniMa6G2SZN5mQr8re0GSblGIJ07adrHiLVbAzddwTKAePAvAD fzYA== 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 b66si6904598pgc.148.2018.03.23.20.02.52; Fri, 23 Mar 2018 20:03:38 -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 S1752244AbeCXDBS (ORCPT + 99 others); Fri, 23 Mar 2018 23:01:18 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6702 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752084AbeCXDBN (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 62E8E20EF9D96; 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 2/5] net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size Date: Sat, 24 Mar 2018 11:32:44 +0800 Message-ID: <1521862367-111399-3-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_indir_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 ac523c9..eb3c34f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -649,7 +649,7 @@ static u32 hns3_get_rss_indir_size(struct net_device *netdev) if (!h->ae_algo || !h->ae_algo->ops || !h->ae_algo->ops->get_rss_indir_size) - return -EOPNOTSUPP; + return 0; return h->ae_algo->ops->get_rss_indir_size(h); } -- 2.9.3