Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp989467pxb; Fri, 22 Apr 2022 16:06:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz13/BbQTswiGJyNGOi/inHd0r1wDC8DONTZg8IvzwAZqqxaNqc/6ir0jEYb9sM9tqmzyqy X-Received: by 2002:a17:902:868e:b0:15a:7c9d:b11f with SMTP id g14-20020a170902868e00b0015a7c9db11fmr7050727plo.151.1650668787559; Fri, 22 Apr 2022 16:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650668787; cv=none; d=google.com; s=arc-20160816; b=Gk8LeuwRCVZMD7MoCKHZl4eea7BoyHRagTLcbxYaHDje/rzUb3elYvWSJ6cVFOJYU6 +qYxKRrciZ6fRnWysYMQSOBPbzSWomXpszF5X9XrYjM3IRunquwTmlUbW3LWXIyyaSyR 28K9/Q81W0PigRBmyTXQwvGZl6i3+urmS0IupT7HQuPYpnmwIPU4u4SuXdM20umX0hbN x8fUVdfah1S2weBV4R5ukGIWQYFNYWSIVr8t9gcqoF6A2wlPGNhZIUyfrCWUtCOE/JKY 1b4t36fX+Q/MzvxvWPVm7yDUDe8qUOIbNILUCowdhJixeun//jWtBJ10YklqkDxlsVti 7DLw== 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=7IQD1XVsVgNtpnSIJlyB1Igy1Zt/tIoNBydvA5N9QY8=; b=iZQz8W/8ki8piBVCxqqAL5p4Lv0OoUfzwXK46GVhB3aJYPEbw35B2cwAGptSgP73XZ HrN92Cg94bAGcb2v2QvrVnEv2m/Nnya1nssW2GREHvdotMYKPAj1TONE28yAtlCDyMP4 9Vtw9XBAon335HEImhB+WqGhVnR3AOzxBaScWgiO0OZCM441jhyuY/5yY36YTpgrVqd2 egzmgO8wnHFsJFHG793D76YBsevVNAQFIHMN2ZXmGUIsYJNx6Dd8qQr9RLKA13bsOvPS HyuSYoRsh/qjZmrgR+1cF6x1Eqj15Z9N+Y+e00N+q3WjVkqKuE/1XaR1OjrojQwVqZEi /cTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lMzILyzV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id cm18-20020a056a00339200b0050a5b062419si9778846pfb.54.2022.04.22.16.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:06:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lMzILyzV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 B4CC2135968; Fri, 22 Apr 2022 14:36:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbiDVVjd (ORCPT + 99 others); Fri, 22 Apr 2022 17:39:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbiDVVjc (ORCPT ); Fri, 22 Apr 2022 17:39:32 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14D054169E6 for ; Fri, 22 Apr 2022 13:45:59 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id k14so8279970pga.0 for ; Fri, 22 Apr 2022 13:45:59 -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=7IQD1XVsVgNtpnSIJlyB1Igy1Zt/tIoNBydvA5N9QY8=; b=lMzILyzVY4s6HqsqcMbieRZUuzRhTfhOR3I/bs3u5XTfI/8c0Q8csI4tw+7aSR7FzJ lZhHjenfud/GLz8MrvPhRok6un812iDrEpnDXIce7PSTQcfKM42NahuNIBku3irxgGlg Hg/x7ZvBxQ51J9+vnDV5d3QrkFrWDo0liJh1zQU3Vr39aVF6R2+KylmIF46tvPc20lEP aLnEykbAWUoE4X1f15OOk4c6l67AOSi3PXp0Z+4g6QXXEeSCFhZh4mTcTDUzB8X4hgWr BbqhFW3WwnAPLzKmTZHmDPu3QQvaHfYT3z+DxUBp4jT8SabsJ0r9b2pID7g+W5c4yY1Q Q2Gg== 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=7IQD1XVsVgNtpnSIJlyB1Igy1Zt/tIoNBydvA5N9QY8=; b=NWmTJtECvZUAfY5gaJLJ8QXBdpi1QbF+pWPiskBTKNABc/wOQh6X6YvmB2adyoKPSi 3Ge+rWjes7/uiUASsra+5L7BnKMxM1JW/IvIufG72LYjTt7+Eay0z55MDl5/W2Ebgsx4 WJB4IlDPwwjnRdvEB9zD9K6fS/vG/5/O3Pw1/jkhOqKPsbltVqNsgLmetWfnih0HFuEt vYdTpwSKQM0UcJbeKowiNqnwPjTEW1No5b29ZpEghHaXmuEjppC6INSAriUTlvpEv8t0 Ze3sqP2YoRMk1jtoyuOoTqaa86eVlL+IO/29JiXQDHNRHTfbsI3VhVANwFv/ekJ6GmKH hYxQ== X-Gm-Message-State: AOAM531MeDt4G0XSdsPjAn+/egjb5OA6XVBXkxV0GbCmKDvovo3k4lnD B3baRK7jdHrbXKd+JCdl3aoj9I+ft1Kt4A== X-Received: by 2002:a17:902:b106:b0:159:5c6:cb53 with SMTP id q6-20020a170902b10600b0015905c6cb53mr6148972plr.99.1650655971280; Fri, 22 Apr 2022 12:32:51 -0700 (PDT) Received: from makvihas.localhost.com ([2405:201:202b:15:bfe0:e8c0:bea6:ee63]) by smtp.gmail.com with ESMTPSA id z5-20020a056a00240500b004e15d39f15fsm3518932pfh.83.2022.04.22.12.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:32:50 -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 v3 5/7] staging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv Date: Sat, 23 Apr 2022 01:02:21 +0530 Message-Id: <20220422193223.11948-6-makvihas@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220422193223.11948-1-makvihas@gmail.com> References: <20220422193223.11948-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 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. Reviewed-by: Dan Carpenter Signed-off-by: Vihas Makwana --- drivers/staging/r8188eu/core/rtw_mlme.c | 15 ++++----------- drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 50a65a4e2..fb64954a0 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -53,16 +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; @@ -289,7 +279,10 @@ 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