Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp765064pxb; Tue, 12 Apr 2022 12:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxir/+U8Ycs/QB+H/BSEo7vfjwnMghCsu5Cyp/o7RzqxF4sWnxoq8vqNJSSjEbbbqXD1/iJ X-Received: by 2002:aa7:8049:0:b0:4fd:bfde:45eb with SMTP id y9-20020aa78049000000b004fdbfde45ebmr39843241pfm.76.1649793123110; Tue, 12 Apr 2022 12:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649793123; cv=none; d=google.com; s=arc-20160816; b=aWHmZdLri+R8debqvWgkeWAVps4lFm5sbcYmg1TL4cPWkxCHrBedbzV06Ursiib4dQ CHaIT4kzvfbSTYeYkZWnlPKFcGc21W9fKHba1DFerLY7kDhK4HmnROMHw4Ij7QDx5iMS H03HEyPIG8N4ppRjdD/NkttGzj2+kNiYlCvJAYBWQPmuqcFiBO32VOlH76W1nrMHmG/f y+zAydGFUWyphDM07TO9Jtmr8SJXwMXZKtuvshquqmCatL+MVownmeMFllF6hP43PNeo 2Y7ROj6mi0gPAGn8XbXZiZffXrORyznFfVEojVyhzxnEbRsUpc4zIF4DB2h78ePbpo6R yDSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u0Zrucn+WwL2muTuZbK71MP5TYNDykrOeiAojxdU0WI=; b=TtusC1Q++m0jPZTaH7qGDyXdbg6/g9T1UVMKfodnqrWS2XwtpF3YD3IymwbHB875w2 xukMKclip+TLu1/4qai16i5lLDHXNlfPqJ5ehvCA32Shc3K5c5XE6Wkp6U/c8hWJKeDo uSPSuSjlCayZS3gpfJ4rEXrOaf/RRUgr5jqy4h069PCzFpQBKYO4BfTYaty80oSI6R0u UbryoKDpUKFRsuQc4LEi32Q1XHHJp631q+xiJVMho/QZ9J0expaPuWGUDB7QF3fTDByG dE0bpxJeO4KLbk6x6ZVs3Y0b2yWWFW0MtWPZsCvQbBhdUQl1Bk1268Me8c9uxWBwQW1v hbUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ch7QdJkn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f7-20020a63f107000000b0039953df8d61si3604093pgi.134.2022.04.12.12.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 12:52:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ch7QdJkn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9CAF1237CA; Tue, 12 Apr 2022 12:47:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243360AbiDKK0M (ORCPT + 99 others); Mon, 11 Apr 2022 06:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345373AbiDKKZ0 (ORCPT ); Mon, 11 Apr 2022 06:25:26 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9664E45040 for ; Mon, 11 Apr 2022 03:22:13 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id mp16-20020a17090b191000b001cb5efbcab6so5687626pjb.4 for ; Mon, 11 Apr 2022 03:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u0Zrucn+WwL2muTuZbK71MP5TYNDykrOeiAojxdU0WI=; b=Ch7QdJknQqzcOMoV8qxSf6WOdf7BNtp+gc2rzVO0jw+mSNFxtNzmw/zu72/nAI7tbw u84t7t6no98vZm/up1Z8bUEbzFlFfeRkYmRPlwKjT+cscsV9eEHUZKNnBiuXUf3WhiT4 yPeU1K1tv8EeDkfGOupRpLBLT5r3GAPx9tkcLat/RfuI+z1KHRLY5mP3sBnpPbY5vGzV ChatEL3m4Iv7smjU4LZfDieL8WwozJFtKPBJ53+kk4lVstpqd9bhbnUlPZBXGGVoKRHA vS8onxkLGq1yq67MU22cpGaXBel69FYTvpn+BrITDN2uXhqbUtpOR2xOYOoCVC7saFlA Xgjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u0Zrucn+WwL2muTuZbK71MP5TYNDykrOeiAojxdU0WI=; b=yTGuILQsFKwJGFTbRyMuDyk8fHSsrq96KrQLx2tXjV8IQFfSlnC6sechTrZwlRoENa 9nOyixrdaCKlu+83G4Yt7j2aR/Gf93OPynFWO5158WEqjDYbozS5DEC2obg4D19b5Jr6 p6hGcChBxQ1wz7QL5CGanqOZ0t1v3P1o+ZOIOneuOmhchSWRorPW5yZK+RQJIrzcAMn0 DJaFOZ0HI8CipCNwfgS51A6WlkR7P+WtKh+0yaXyyaPeMNMom0gO/wmX1ns1w+VLNB8T UGxu8IwX5w9VOXVrAEPnCknYUT7PuScbHMpcxeXjQMaNRk8p9OUDYe9xR6KiGjokYkcI zO5g== X-Gm-Message-State: AOAM531oYjsvskGKL3F7qDz0m4oD3ML+uRneZKOnS5eBDDBJogTdB5u2 6+DEPWoF6FlfQVc1W11nHoo= X-Received: by 2002:a17:90b:4c92:b0:1c7:a9a3:6274 with SMTP id my18-20020a17090b4c9200b001c7a9a36274mr35551149pjb.148.1649672532937; Mon, 11 Apr 2022 03:22:12 -0700 (PDT) Received: from makvihas.localhost.com ([2405:201:202b:15:4376:c658:ae1e:1781]) by smtp.gmail.com with ESMTPSA id z14-20020a17090a170e00b001cb7e69ee5csm4886318pjd.54.2022.04.11.03.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 03:22:12 -0700 (PDT) From: Vihas Makwana To: Larry Finger , Phillip Potter , Greg Kroah-Hartman , Michael Straube Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Dan Carpenter , Pavel Skripkin , Vihas Makwana Subject: [PATCH v2 5/7] staging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv Date: Mon, 11 Apr 2022 15:51:34 +0530 Message-Id: <20220411102136.14937-6-makvihas@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220411102136.14937-1-makvihas@gmail.com> References: <20220411102136.14937-1-makvihas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NO_RDNS_DOTCOM_HELO, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to rtw_free_mlme_priv. Signed-off-by: Vihas Makwana --- drivers/staging/r8188eu/core/rtw_mlme.c | 17 +++++------------ drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 6b8c80fe9..5584e1b84 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -53,17 +53,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie, &pmlmepriv->p2p_assoc_req_ie_len); } -void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) -{ - - rtw_free_mlme_priv_ie_data(pmlmepriv); - - if (pmlmepriv) { - vfree(pmlmepriv->free_bss_buf); - } - -} - struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *free_queue) */ { struct wlan_network *pnetwork; @@ -290,7 +279,11 @@ int rtw_init_mlme_priv(struct adapter *padapter)/* struct mlme_priv *pmlmepriv) void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) { - _rtw_free_mlme_priv(pmlmepriv); + rtw_free_mlme_priv_ie_data(pmlmepriv); + + if (pmlmepriv) { + vfree(pmlmepriv->free_bss_buf); + } } static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv) diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h index 1dc1fbf04..fc30793f4 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme.h +++ b/drivers/staging/r8188eu/include/rtw_mlme.h @@ -560,8 +560,6 @@ void rtw_scan_timeout_handler(struct adapter *adapter); void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv); -void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv); - struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv); void _rtw_free_network(struct mlme_priv *pmlmepriv, -- 2.30.2