From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753936AbcCJMG2 (ORCPT ); Thu, 10 Mar 2016 07:06:28 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:46090 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849AbcCJMGK (ORCPT ); Thu, 10 Mar 2016 07:06:10 -0500 Subject: Re: [patch net 1/2] net: hns: fix return value of the function about rss To: Andy Shevchenko , References: <1457576189-22924-1-git-send-email-yankejian@huawei.com> <1457576189-22924-2-git-send-email-yankejian@huawei.com> <1457597509.1347.49.camel@linux.intel.com> CC: , , , , , , , , , , , , , , From: "Yankejian (Hackim Yim)" Message-ID: <56E162C2.6070709@huawei.com> Date: Thu, 10 Mar 2016 20:04:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1457597509.1347.49.camel@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.126.191] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.56E162D1.0131,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a35360b992ac668b91ac5b7be4430044 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/3/10 16:11, Andy Shevchenko wrote: > On Thu, 2016-03-10 at 10:16 +0800, Kejian Yan wrote: >> Both .get_rxfh and .get_rxfh are always return 0, it should return >> result >> from hardware when getting or setting rss. And the rss function >> should >> return the correct data type. >> > @@ -1213,7 +1213,7 @@ hns_get_rss(struct net_device *netdev, u32 >> *indir, u8 *key, u8 *hfunc) >> >> >> ret = ops->get_rss(priv->ae_handle, indir, key, hfunc); >> >> - return 0; >> + return ret; > All three can be one line. ok, thanks! >> @@ -1241,7 +1241,7 @@ hns_set_rss(struct net_device *netdev, const >> u32 *indir, const u8 *key, >> >> ret = ops->set_rss(priv->ae_handle, indir, key, hfunc); >> >> - return 0; >> + return ret; > Ditto. > ok, thanks!