From patchwork Fri Dec 30 17:53:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 37724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3002990wrt; Fri, 30 Dec 2022 09:56:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1MbfGb3T3N7JU8WIqT+cAHuYYb4ApPxuiBA9dfj3BrQ19BReh1PzNytAtL3JxopimWtI1 X-Received: by 2002:a17:907:a508:b0:7c1:539b:d028 with SMTP id vr8-20020a170907a50800b007c1539bd028mr27452904ejc.48.1672423013328; Fri, 30 Dec 2022 09:56:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672423013; cv=none; d=google.com; s=arc-20160816; b=AE08mQDpnp1CLLQWsBhx5fVNiaBiqiG7muSJShkwV3lqt2N7rOKpjMuxt7/dRf4Mp7 5rdemE340XeeJqikoCNS1IW2uTg/cBtW58Eo7Cz35nVt2P0YUmuFZdgniUTcQU1rdT6l t2QKTrn4wnRiOIjGTHg1qYTV+xzWpyCdANwou0TYUW6Qmm2JSFsuAqEiEJcrq8Puw6/H f5DEVM13Y+5gGDD7Dl6uo8tseb7JolCX+19a9VByLum+sx6GhoG3X0e0Uuuz0DpMX49C EQehHxNYLLsYnNt8M/Rf0urYXMH4D5m3Akp709GUItsKWWbOXPKUZab03UVcFp9ycaaV fLJg== 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; bh=DwTGHAanvjIWQP3TIhIhgf8SfUxNM4oKxZHGoexu1MY=; b=Q+mo67YBm7/ejlZxhhpiaLw8BS8xWDIrCImQS/YfXEFi5RylGfjqnmaAXuhrf6ausO F5r8wwbsnMIJ70DQSoDpxqf4gdd0U5K07m/utKzMgF7KFdOPG4+B3YBhaXsXJ1Ifi2Jn nmqYFedw1XmH+WMDczzBhm3+xd/qKngyznFoA/SRhmXgIch5l9QHCPmKgoaBVc2PYipL I8s8UQNtSM1b0dJWvr0jUeg0+dP+pDL9nMeZnX3ogqDMxFOx8B1dA2P3KVe+kpruasBy fnuMkBlAoM0w43MT5hZVsBLqkBord7TlwcOLVxQDJS0S9pk/AQkTHhZ01YbCJqhlgkg6 nCFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs18-20020a170906dc9200b008366ae33ebbsi20473232ejc.562.2022.12.30.09.56.30; Fri, 30 Dec 2022 09:56:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235071AbiL3RyF (ORCPT + 99 others); Fri, 30 Dec 2022 12:54:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235124AbiL3Rx6 (ORCPT ); Fri, 30 Dec 2022 12:53:58 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 405BD1C400 for ; Fri, 30 Dec 2022 09:53:58 -0800 (PST) Received: from dslb-188-097-208-179.188.097.pools.vodafone-ip.de ([188.97.208.179] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pBJZo-0004hN-8d; Fri, 30 Dec 2022 18:53:52 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/4] staging: r8188eu: merge on_action_public_default into its only caller Date: Fri, 30 Dec 2022 18:53:24 +0100 Message-Id: <20221230175326.90617-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221230175326.90617-1-martin@kaiser.cx> References: <20221230175326.90617-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753662633408983360?= X-GMAIL-MSGID: =?utf-8?q?1753662633408983360?= Merge on_action_public_default into on_action_public, which is the only caller. Yet again, this makes the code a tiny bit smaller. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index cfa65813d3f2..0b2f5d6c1279 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3735,29 +3735,20 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame) return _SUCCESS; } -static void on_action_public_default(struct recv_frame *precv_frame) -{ - u8 *pframe = precv_frame->rx_data; - u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); - u8 token; - - token = frame_body[2]; - - rtw_action_public_decache(precv_frame, token); -} - static void on_action_public(struct adapter *padapter, struct recv_frame *precv_frame) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; u8 *pframe = precv_frame->rx_data; u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); + u8 token; /* All members of the action enum start with action_code. */ if (mgmt->u.action.u.s1g.action_code == WLAN_PUB_ACTION_VENDOR_SPECIFIC) { if (!memcmp(frame_body + 2, P2P_OUI, 4)) on_action_public_p2p(precv_frame); } else { - on_action_public_default(precv_frame); + token = frame_body[2]; + rtw_action_public_decache(precv_frame, token); } }