Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2118451ybm; Sun, 31 May 2020 09:09:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy1yUJ0OoiWucPqHCdFxPf5byehk/d17Nq8+BvtdLeI+n+OsqrWq6W9v0iIz9XhfZ1SweN X-Received: by 2002:a17:906:4815:: with SMTP id w21mr16871654ejq.533.1590941361828; Sun, 31 May 2020 09:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590941361; cv=none; d=google.com; s=arc-20160816; b=Ir/Vz31NsSHCduv4PWO1+Hp9xjm/sew/9lcKedC7sQJEzs49BFI2z1Ntf40EcK6I/2 GzB5R4iDzb9vYmOgseIQ2KV8QcPT5qf8Jm2cw7ac8T6m3vKYrd4AvTSotJSzaHM376i4 UPLFoQFapglLz+goRaBYeVZGRLPvCXGC+T0BwgB5mtd4qp9RE1y7hvyGtKSCcbs6e9Jk edtheNMV0ZEWjB+C7n6zgvqBALjFj7EHnq3TeS0iI3//adQuu2uJ1SdKczMlGVP/8l0S fAKezoBcGOkQ/wTiPK351R+fiZ8HPq2Zp44fML28sYAwFyl/Adqw510xYDbFQu8WMSzJ UNbg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=/jWa79zjp43R39+MRgzum8emlYhe6zDNSyhVpmFy1UM=; b=ve7zbpBt0NitJ12O0qQZCPh/dGkqOiPGtP8K5sA7vN84wfrUs/H3Pg06L+ps6poCAX xhGwd8Jy0udOkD/1C7oys7n29WSWxV0S8Myvrwf0vbZugDtd4UuPUopIjCyl5KMypHdC AoltxR4h0MYu+CK+99l1Hz2cWpGQaAwxo+q++klwIaYgN0tzr1t+pS+URWPjLVAiuhUd 9s3i2qABC88iKtgoNRZkoGZMyl3r5mDbdVq9LqS1KsqXgOPqw0lEBVO2cJJnHWZnDFjE DZl5oV8WT8qKF57JRuZqwwJQ33xsD19o8JRGWqgy1LZMaDhPVcxOgAuhoIvtJcVtb91r OFpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m12KnDSm; 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 e20si2299468ejx.262.2020.05.31.09.08.56; Sun, 31 May 2020 09:09:21 -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=m12KnDSm; 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 S1727951AbgEaQED (ORCPT + 99 others); Sun, 31 May 2020 12:04:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgEaQEC (ORCPT ); Sun, 31 May 2020 12:04:02 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ACF2C061A0E for ; Sun, 31 May 2020 09:04:02 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id z13so5091067ljn.7 for ; Sun, 31 May 2020 09:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/jWa79zjp43R39+MRgzum8emlYhe6zDNSyhVpmFy1UM=; b=m12KnDSmpBchSpW8O7NIpxxcXDYX30r/lGOgLTRij+5Bjlywkszb/9+4yyx7SC9oOk q8USkg8z2klLfxe/wXbn9ST8N66ESi4x2eJ+O2DVkcuybgKqL1frhFwFRBGYtBMaObLA mDQMwikzSAewO6l2vRJggLfJJ34q2X+e86XobZc9EpuGuBDDfU5oTHJe3LIJ4+nkM3zq LZOU2/LYijae6tH20nxcy076CAif8Md7/YJaokMfaagg5NwVnv53ed/SZgHIVqo5eAsJ yIVsY0eJSJLWoTfLatzPWVA8bI2BVFikueanAgNjXKgVGfmgnc4dr4z6xtKPmS25l1p4 GBuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/jWa79zjp43R39+MRgzum8emlYhe6zDNSyhVpmFy1UM=; b=pfMCx5ogcrxUSrt/8YetW3aog4e7XRZzbmtc4mjp+d2wTNekfjRtQrwPsxEpJLdT/+ SjhKLeipFtFlBFVxMh1la6KGONTesUQ+jGtKXUjaI5ZPdSEB6L6t0DCUkhEafGlMwVRx Tflx2jyoUpS15VHHegv3kS0vJibiZerQ2IWPuh4MXXun3xvOLh6Hh7w4wKD9/NBoZaAN 2Fx12r7SDs6iZsReYuT0ayXapyjwuwBtX0SstRUFs3a5NOCzdg4tuOR/SFb/tV4GtaSF tfxKO4fMvCvPG55UMSsobqCweatf8p4OeKuYQ+DSip4YUigCQgdjuSwhMQx3T4pcHPMu BO/g== X-Gm-Message-State: AOAM531CxeCMxIETC/01sa51mcpnAyQ/ucDE5y5kapWtXvS32k+Uuaxt 2/NI9sj77qxfQXgeJD28SIw= X-Received: by 2002:a05:651c:311:: with SMTP id a17mr3538745ljp.322.1590941040184; Sun, 31 May 2020 09:04:00 -0700 (PDT) Received: from alpha (84.188.smarthome.spb.ru. [80.249.188.84]) by smtp.gmail.com with ESMTPSA id 6sm3329265ljq.115.2020.05.31.09.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 09:03:59 -0700 (PDT) Received: (nullmailer pid 39166 invoked by uid 1000); Sun, 31 May 2020 16:08:52 -0000 From: Ivan Safonov To: 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, Ivan Safonov Subject: [PATCH] staging:r8723bs: remove wrappers around skb_clone() Date: Sun, 31 May 2020 19:08:43 +0300 Message-Id: <20200531160843.39120-1-insafonov@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wrappers around skb_clone() do not simplify the driver code. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8723bs/include/osdep_service.h | 3 --- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 5 ----- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h index 5f681899bbec..be34e279670b 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service.h +++ b/drivers/staging/rtl8723bs/include/osdep_service.h @@ -94,7 +94,6 @@ void _kfree(u8 *pbuf, u32 sz); struct sk_buff *_rtw_skb_alloc(u32 sz); struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb); -struct sk_buff *_rtw_skb_clone(struct sk_buff *skb); int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_malloc(sz) _rtw_malloc((sz)) @@ -103,9 +102,7 @@ int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb); #define rtw_skb_alloc(size) _rtw_skb_alloc((size)) #define rtw_skb_alloc_f(size, mstat_f) _rtw_skb_alloc((size)) #define rtw_skb_copy(skb) _rtw_skb_copy((skb)) -#define rtw_skb_clone(skb) _rtw_skb_clone((skb)) #define rtw_skb_copy_f(skb, mstat_f) _rtw_skb_copy((skb)) -#define rtw_skb_clone_f(skb, mstat_f) _rtw_skb_clone((skb)) #define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb) extern void _rtw_init_queue(struct __queue *pqueue); diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c index 4238209ec175..6d443197a0cf 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -47,11 +47,6 @@ inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb) return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); } -inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb) -{ - return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); -} - inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) { skb->dev = ndev; diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index eb4d1c3008fe..b2a1bbb30df6 100644 --- 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); } else { psta = rtw_get_stainfo(pstapriv, pattrib->dst); } -- 2.26.2