Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2157798ybm; Sun, 31 May 2020 10:26:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9Xw4ekdga7xwhfmJgFfTQHWk0hDl3u+llbhGIq8i0WJuYy5lxPLItlZjb0ZfLYnU7ExcX X-Received: by 2002:a17:906:1353:: with SMTP id x19mr6906670ejb.469.1590945994052; Sun, 31 May 2020 10:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590945994; cv=none; d=google.com; s=arc-20160816; b=hstNwFwwniXNsfAllRTKHweVxJi1TtaP9K0r+uxIYYQtL4IKphvdqffdWFXtPrCKq8 uMmg3gQff/lPBEQGkLzwllQyCjn2tKX0y6n2AicS71mLDBLUKkrrz2TPi8+ataVvCJ87 O/3zc7zC7EUC+S7Ead/ijonRhGTcJ0jgvfDg9rGw1DOytfZALYISIQyS0oXgS9GvNl2H z2JgLmj2TTwYa+7qTFFpVVZMa/6YPfZIDbsA12/Q/c7C57orHoqIL0scn/u/07jq9inm +UqNzJLSxANRGX5RMQcyoVZkrue+RvJzhBdnxHdFpqjYUzsWEOX8lkwDB3ogpsuusRI4 gmmw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Gan8Hs5cLhd2R8PjllgAUBiWMj838r9OJwwYSGGCD8k=; b=AFqq8v0zzcKNY6i1KSNTeBr24HtVM8haJQInh4pVQ3F7B0FrxSPiqSzBcp8OE5Dl8o Ou20Ov84taZAC9ePY4xwsv4Ahz44I6itCqIyhKmBounSUG+VcCH962xjU11cFL5kic6S CkTAonF4HgH8Kbv8aZ4+FZWfrKQpmFINUklCLYR5a/6unMMPIMsUHecZaaXOhtWiBuGP qatqs29xomtc7po1URxgRjctp3CJGG1+Uknh91rS4oWJ5VIL3oETAijZ/GRW+LCxdqfX OegZlwJ2dQ+iUnY8F+JfRA7GppZQwA4cRNqtCovbVkMi5Bv81ARkPnkF3vKAaAZyDXrh On1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dDBuriuX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k23si6371817ejk.35.2020.05.31.10.26.09; Sun, 31 May 2020 10:26:34 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dDBuriuX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbgEaRXd (ORCPT + 99 others); Sun, 31 May 2020 13:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgEaRXc (ORCPT ); Sun, 31 May 2020 13:23:32 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B35EC061A0E for ; Sun, 31 May 2020 10:23:31 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id x27so2554993lfg.9 for ; Sun, 31 May 2020 10:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Gan8Hs5cLhd2R8PjllgAUBiWMj838r9OJwwYSGGCD8k=; b=dDBuriuXusck1paeyAvVZbqTUhubuee/TOwISJbBrCcoICtysuO5DR8/1bQrKiRpVq WxTXJo4D/6APNYU0c0DhTcIZMxxFuRkXl7rL55sFGkx5UcpzGbWbQHCBC8OGZVbz2Rwz YJJzysWpOdQmvmQq94I23nDyXl2zrNN2InUoulU3G4aqg0x5al5GqkVqEpBVc/MjkZk8 IO6g6fZ0JuAqcu1IskHfeeh28i71CgAEIcOo5j0yy3g3Tjstd3kKvOVZPdW3tQnhH2Lr OPfD6eswxlH3ZgW8rCS/G51Ex91m5OM3hQIatPid4uQIns8UJGjqfom0/7SpExs72p7s KBJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Gan8Hs5cLhd2R8PjllgAUBiWMj838r9OJwwYSGGCD8k=; b=jfqQCr56N2sNF0zyndHVmcFEG79u4TdDxO8zmA0FVVnxvgZg89EYz5WJ2RPupW6gfh qVFYd5yVpGJqFmMnBVzWzxI6+januJC6Q6CxDBYPbNZnDHwdlGjyTxs6KnxWL2QxRHEP EkDN2e0ZcBOuwJ6M5TEu4y0QPSpZdHNOr3oiuyKIQGs2snau5D2n/FYhCWqCGr7tMBGg 4ZvRMbM0jvxu5dw0Xg4cotj6MfjxPlOcgU267heYtwKHR257zmEREnLj21KOi/bw0cNd dp2Q9QT3/vUH+HMymJMk789GF7IFP2hgmDd2uUzkfG6pGHf6xjzAwD7JvuHzZcWSdT5r ckPA== X-Gm-Message-State: AOAM533uNXS+AFAu9HQomHHgl5nj1mkYoyALtfT08hrDMTZ8ihcoOeF6 eaVKj1WEBau86RPJXAVLeRzL2eJK X-Received: by 2002:a19:356:: with SMTP id 83mr9470602lfd.179.1590945808848; Sun, 31 May 2020 10:23:28 -0700 (PDT) Received: from [192.168.0.160] (84.188.smarthome.spb.ru. [80.249.188.84]) by smtp.gmail.com with ESMTPSA id p68sm3927319lfa.71.2020.05.31.10.23.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 May 2020 10:23:28 -0700 (PDT) Subject: Re: [PATCH] staging:r8723bs: remove wrappers around skb_clone() To: Joe Perches , 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 References: <20200531160843.39120-1-insafonov@gmail.com> <7bf8612d3708b811e026daec5c7a1486c5954905.camel@perches.com> From: Ivan Safonov Message-ID: <8e4df253-e021-6c29-96ab-24eed9b61eb2@gmail.com> Date: Sun, 31 May 2020 20:28:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <7bf8612d3708b811e026daec5c7a1486c5954905.camel@perches.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/20 7:15 PM, Joe Perches wrote: > 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 ? The rtw_os_recv_indicate_pkt() is always called from an interrupt handler.