Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2124683ybm; Sun, 31 May 2020 09:20:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMN1jjST3vR/U18xTBWTBHyFvCbcWerkrPJQwx3IILW5HS9sRKYdKsDIIzysoONr409e0X X-Received: by 2002:aa7:d283:: with SMTP id w3mr5555717edq.262.1590942023585; Sun, 31 May 2020 09:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590942023; cv=none; d=google.com; s=arc-20160816; b=C1i18nuHSrewARGy0KusUin3eyc7sODuWdPOvwlz5XQo7zuP093wkpJi4IA0+gP0yS rCesCPsHWXFqlr+gw1rNSyHUu4eP8OVGy4lHAkyneNBUAGfEbPJ9eLSUXgejtGYFyq2d SXMUb7zdYQQC3VSG999NqCcQNeRY/VY2DP0T+GlXhpdZDPKnPsdTeB/dAGnjm9s60LRY gTVneYqQufzC9LzgAYTQL84DdkQ/XCkjkUvl64l4aPZxzDDVyEUs8+IU8GaUuEne8ZCv bvZpA7SU+5oOczH/l0nTI+SDVSLxtcma3WoAXdMhglYMSaSF6cUuLwAvJ25NEgiwV03f 2mVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=sQNtG/x3PzD3cXY/r9heYPMMpk1tevX18slvpUC0Dfo=; b=nS/we5DaEXNHuFFxyVSU+K1yz9zxDokC2UaQ8Xf5AX3bCVoQleyrc4nHAKeDp7vys3 H4nFi2CeFgBLlXQUMDCNXv6F3RYXNy+B4dSMRh76XdCRvVWchEDhFGAj09c/hSDM5koo DfiorX6TolmBxs5s42js7zAegJN4wvXC95cw2YX2zwFzl4JFg5K5m18q1VsTxhl+XM1G 4ZNUCOOI9CRf0ubmKYyM3DtrWebTBBVvO6m0KT1y378dbhDSiiHDVCUgVO9C+NRdkKuq gU8Vw68g8IkufDhM0wM9/QXZy3yzl+FV55qZcfz5nx3C69qMPce0ugSTIrY9uVk4WpHF Bh2A== 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 w16si9387053ejv.608.2020.05.31.09.20.00; Sun, 31 May 2020 09:20:23 -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 S1728134AbgEaQQB (ORCPT + 99 others); Sun, 31 May 2020 12:16:01 -0400 Received: from smtprelay0238.hostedemail.com ([216.40.44.238]:40564 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725912AbgEaQQB (ORCPT ); Sun, 31 May 2020 12:16:01 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 2D08B513; Sun, 31 May 2020 16:16:00 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3865:4321:5007:6119:6742:10004:10400:11026:11232:11657:11658:11914:12043:12296:12297:12438:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21627:21990:30012:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: sand35_0d17f8e26d76 X-Filterd-Recvd-Size: 2058 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Sun, 31 May 2020 16:15:57 +0000 (UTC) Message-ID: <7bf8612d3708b811e026daec5c7a1486c5954905.camel@perches.com> Subject: Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone() From: Joe Perches To: Ivan Safonov , Greg Kroah-Hartman Cc: Rasmus Villemoes , Hans de Goede , Miguel Ojeda , Nishka Dasgupta , Lukasz Szczesny , R Veera Kumar , Hariprasad Kelam , YueHaibing , Shobhit Kukreti , Dan Carpenter , Pascal Terjan , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sun, 31 May 2020 09:15:56 -0700 In-Reply-To: <20200531160843.39120-1-insafonov@gmail.com> References: <20200531160843.39120-1-insafonov@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-05-31 at 19:08 +0300, Ivan Safonov wrote: > Wrappers around skb_clone() do not simplify the driver code. [] > -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) > -{ > - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); > -} > - [] > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c [] > @@ -110,7 +110,7 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt > if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { > if (bmcast) { > psta = rtw_get_bcmc_stainfo(padapter); > - pskb2 = rtw_skb_clone(pkt); > + pskb2 = skb_clone(pkt, GFP_ATOMIC); Why make every clone allocation GFP_ATOMIC ?