Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5073198rwr; Mon, 8 May 2023 17:54:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gyLsVn7i60eqxk0UueE4iV3+kyzN91k7KlOmcaV5FcC2SqHtgR9j1VFTs3tScIEe65KBf X-Received: by 2002:a17:90a:db8e:b0:250:83ef:a038 with SMTP id h14-20020a17090adb8e00b0025083efa038mr6191545pjv.8.1683593690811; Mon, 08 May 2023 17:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683593690; cv=none; d=google.com; s=arc-20160816; b=u1NbeL+NDvKi6LRZGq6aByh/aPoPuPHRm7X4r8bRWqbKVVP3dHeBRsViTL0g6Ii3Rv gFznuGj42yPRVxLHUFIQA7tcH8c/QYP/lf/bfvOE8olP8I/pg53N+xu0nqTGmTc6A20U 5AcMrLBGMhq9POVnRDfpUib0aQM02WNfqictcHomOcU408gt7aXwiOCN1pK6HUOOfN9J oO+L2BQbP58IHxSR6VeY11rBbl8wU1q9istiBhNgzTELr26M06mIzl4uqXquo8jpB+FV pIyUfFRUqB6s/8Gcy+D3R38U3IG9K4RwyOhKUtBWsyq3Bx/An9+x+T0Sb26uht2voLFL r4QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=YFgSVqFAWH7JI2Izgf6YvZ8Ny6jym2Wff22kZof9P6U=; b=vLryfBgsuKdTA4VAYDx5PlkdaSRsfAB5JzA4KeQZNeIeM3IcWAcZlEzUgmWp8d62z0 WniqJLikUNs+SFUZKhJv19p1LEvZj27CGIz48JSX0VKes3Kcp/VJ1C/up7WGJFteBcU7 mmA6sWTVw2U2Vbsj403kckqHrvQC30F6BBZYyb0OGBUixYUYt1kKeiC+HkXfhNd/2ZBm TKwVAZSQi+FsE0F6Xihhw4CLQEju8SzIceegxlWda5ypCJyDCs+ZYO+rJxGdkcxQKQfX hoYXwJEUEdXloXZHbBHxpzkEYprAsS9Y2Ia5GLz48IkBRXQhGerwefUj44UOe/Z6ePra RxAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a17090ac58600b0023f37b648d9si13783164pjt.157.2023.05.08.17.54.37; Mon, 08 May 2023 17:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbjEIAvM (ORCPT + 99 others); Mon, 8 May 2023 20:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjEIAvL (ORCPT ); Mon, 8 May 2023 20:51:11 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07BE24C02; Mon, 8 May 2023 17:51:09 -0700 (PDT) Received: from dggpemm500005.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QFfh404RszpWF8; Tue, 9 May 2023 08:49:56 +0800 (CST) Received: from [10.69.30.204] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 9 May 2023 08:51:07 +0800 Subject: Re: [PATCH RFC 2/2] net: remove __skb_frag_set_page() To: Simon Horman CC: , , , , , , , , , , , , References: <20230508123922.39284-1-linyunsheng@huawei.com> <20230508123922.39284-3-linyunsheng@huawei.com> From: Yunsheng Lin Message-ID: Date: Tue, 9 May 2023 08:51:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/8 22:31, Simon Horman wrote: > On Mon, May 08, 2023 at 08:39:22PM +0800, Yunsheng Lin wrote: >> The remaining users calling __skb_frag_set_page() with >> page being NULL seems to doing defensive programming, as >> shinfo->nr_frags is already decremented, so remove them. >> >> Signed-off-by: Yunsheng Lin > > ... > >> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c >> index efaff5018af8..f3f08660ec30 100644 >> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c >> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c >> @@ -1105,7 +1105,6 @@ static u32 __bnxt_rx_agg_pages(struct bnxt *bp, >> unsigned int nr_frags; >> >> nr_frags = --shinfo->nr_frags; > > Hi Yunsheng, > > nr_frags is now unused, other than being set on the line above. > Probably this local variable can be removed. Yes, will remove that. Thanks.