From patchwork Thu May 27 11:35:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 449857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50F39C4708C for ; Thu, 27 May 2021 11:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29F90613D1 for ; Thu, 27 May 2021 11:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233866AbhE0LhP (ORCPT ); Thu, 27 May 2021 07:37:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:45996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233044AbhE0LhO (ORCPT ); Thu, 27 May 2021 07:37:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD92D6113B; Thu, 27 May 2021 11:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622115341; bh=p73O82Z1ZhU3VDcrG/bDC+qzdAACTdgokU8OAn8p5Mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qsv4UNpwnB4EAg+6gDct7EVgm+squiC/sGr3/Lt5NYFqGAS+KR/iajZ9b8tMrvxIe Omhxm9WNp45frBxpy5ae6hkfj7e9lsb87ddge86Vr5bV3U3dtS5xgjlxDqk5B0EKDw ++c2Beg+gHeEjQEa9M3H+6e8ZC1BdGs5XQ7wq8rnSk+DEirD+/T6rYC47b/BDjCpK/ wSnFhuVoRDj7MBnJ0JCmoSZkLjhMZapXM8qqnjJrRkEiRP+VeZZ3aa8XV4zfLw5cPN L5gt82zWa7Mwmv0nGjcO1wy8yR6FWURv311QZvH7W5gak8Amq8bXUL32zvAxIeM1S2 RSLJrCoQ4uzfg== From: Lorenzo Bianconi To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, shayne.chen@mediatek.com, ryder.lee@mediatek.com Subject: [PATCH 2/3] mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb Date: Thu, 27 May 2021 13:35:29 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Get rid of unnecessary function calls in mt76_testmode_free_skb routine since they are already managed by dev_kfree_skb Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/testmode.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/testmode.c b/drivers/net/wireless/mediatek/mt76/testmode.c index f40387a866ee..c516469278a4 100644 --- a/drivers/net/wireless/mediatek/mt76/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/testmode.c @@ -88,17 +88,8 @@ static void mt76_testmode_free_skb(struct mt76_phy *phy) { struct mt76_testmode_data *td = &phy->test; - struct sk_buff *skb = td->tx_skb; - - if (!skb) - return; - - if (skb_has_frag_list(skb)) { - kfree_skb_list(skb_shinfo(skb)->frag_list); - skb_shinfo(skb)->frag_list = NULL; - } - dev_kfree_skb(skb); + dev_kfree_skb(td->tx_skb); td->tx_skb = NULL; }