Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp795272pxb; Tue, 12 Apr 2022 13:40:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW00/JkyRWUnTn3qCHZzczOX8GbMScvJiGF6p4t8WXpBz3uv8FbJqo60wqXN7caDo6C+X8 X-Received: by 2002:a05:6a02:283:b0:342:703e:1434 with SMTP id bk3-20020a056a02028300b00342703e1434mr31673429pgb.74.1649796045666; Tue, 12 Apr 2022 13:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649796045; cv=none; d=google.com; s=arc-20160816; b=sqKvH8IYLBLEh/dRLdb1NdMh0d4blZfBic9kGEuJAxEXJEdbS4tEQiFV+AM+LSczV+ XkTllXHQ2chs3L3dPqTk6JLZyHWU3h/gLewhUeAbfnb3mmytUifm6BIUhZotvEz94HU1 Ozazbc+sfrlZTEPT3dw3Fb9sjKWKi5E+vp8wCBLj9tQFsvGM69W2164o2xdQqOTOxCbA 5/h8J64PTgmgj/Gf8TJRHy6n5XjNxRT3Dps3Z1qZBhb7rMm+i3YcM4FWrLYbjYhSJLy/ 0n3qXvgo2IlypJv2fMesC2NsbE4GmLPbtscdetnZarrIvmObn1OYF/ELlN6zZ0kze1xk f1Tg== 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=ioOLOPRMwxuocGQiKn3ZypvnZg8gicvD1hlKV7CC/G0=; b=x+HJ+ismrUvX/C/neHkaRVWbWvc0KVU2KRmofmfTaAO/bF2t+i8uBLS9hvX4lL+hU8 XeiJpV4sA0pNTi06cEZLBYgLkyBD3lLEh52HqNYaTf3K4H1xaua+GnVwuU/BwmN5Dm0q 8+Z9v4SIbvElz2XqAseXbN6hiPqpS8u+drjXXg1nvlUXv3s6BhyND/Bupt12bnMvhGpG SFYVHH+nZp89B9oKNjcHOs9lnvjYpwalRUCv992ITemi6Gx8c+IQ7nYkSK+BOUOgRkEd xHy/foVoGcQENQ02L7lbq+MlhnLG4sPjhjw1/2+jXxF7LHSJ0AhZQKkuVgsB+O3+YYYY MWOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WScTtEoP; 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 j13-20020a170902da8d00b00154a965e488si6056992plx.237.2022.04.12.13.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:40:45 -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=WScTtEoP; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 80810BA33C; Tue, 12 Apr 2022 13:13:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345464AbiDKKZf (ORCPT + 99 others); Mon, 11 Apr 2022 06:25:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345444AbiDKKZO (ORCPT ); Mon, 11 Apr 2022 06:25:14 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AC8144769 for ; Mon, 11 Apr 2022 03:21:59 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id k14so13821603pga.0 for ; Mon, 11 Apr 2022 03:21: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=ioOLOPRMwxuocGQiKn3ZypvnZg8gicvD1hlKV7CC/G0=; b=WScTtEoPg8rfuBUuUvYtHKVp0wwTmhBMdvNJ3OF1NaBNKpunV+yblivfIzRpwSEYLO TC41U82zJnuLIx/l60Ou+clbet6SWmkwv3PDiX46bnipEQ588owetbfOSiDDxftyt+zd Dbp+0eWhV54Hs1gwrQ6aOFn9aZAmpjAt9ek/qzC66ynoDPt+YF31lN5hMsIcIbygMizh DBrDu4qbfylwp04MCHBSXuZK4yy+DLfI+TNGr4sOzl+OK3qfFz/3yXzICxlLCYA0Mqs9 1k40WYjdwGckv3bWdF8GvCp3GX2bK/0muGVGJC3KYH8i9v/gQ5BFRvigKCscFqmTuaFD oUGg== 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=ioOLOPRMwxuocGQiKn3ZypvnZg8gicvD1hlKV7CC/G0=; b=7STpGDSl6oRAZQuXi7Hi25Gi6xbEg0mAeaq19QShh3da0Am7u2oxPeYoMglk4ESSco X2PbUkvQQxLRTWDEGLylzmodUOPf6ML+53mZBxkrGkO44fi2HSgdhXN3GT7CKjryyGZF GlWYeXxJ5WIpURuYTqI26HZpbsApFUCO4fY8T2h26zcC29ki99QJJ57HTOQT5f7KN646 b2WOIkp0yLVsH1v8pregkSjpA0RWOzY2O56ZI0h+4dL7SXzh3cGlkgmXyNEmZE6GPBJH GPi7PHrKn16krgCC3sOUDvptrGsr6Hr+5oSWNqCwdGoqm41OE0AjA0eDimI3X2qxW+0l rAkg== X-Gm-Message-State: AOAM530bdWukEHPBO38ei4qb8lNCyTAXIBh9XyQ16w3vLpwPFBjX35EQ FV6iEwTf3Bi3P6qws5v/nR8= X-Received: by 2002:a65:47c4:0:b0:39d:4f85:40e0 with SMTP id f4-20020a6547c4000000b0039d4f8540e0mr4041654pgs.309.1649672518843; Mon, 11 Apr 2022 03:21:58 -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.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 03:21:58 -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 1/7] staging: r8188eu: drop unnecessary wrapper _rtw_free_cmd_priv Date: Mon, 11 Apr 2022 15:51:30 +0530 Message-Id: <20220411102136.14937-2-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_cmd_priv and move its logic to rtw_free_cmd_priv. Signed-off-by: Vihas Makwana --- drivers/staging/r8188eu/core/rtw_cmd.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c index f036a980e..d53217900 100644 --- a/drivers/staging/r8188eu/core/rtw_cmd.c +++ b/drivers/staging/r8188eu/core/rtw_cmd.c @@ -87,14 +87,6 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv) } } -static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) -{ - if (pcmdpriv) { - kfree(pcmdpriv->cmd_allocated_buf); - kfree(pcmdpriv->rsp_allocated_buf); - } -} - /* Calling Context: * * rtw_enqueue_cmd can only be called between kernel thread, @@ -159,7 +151,10 @@ u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { - _rtw_free_cmd_priv(pcmdpriv); + if (pcmdpriv) { + kfree(pcmdpriv->cmd_allocated_buf); + kfree(pcmdpriv->rsp_allocated_buf); + } } static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) -- 2.30.2