From patchwork Sun Oct 30 17:33:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1893911wru; Sun, 30 Oct 2022 10:35:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM473P/HYJHoLuyKI+BgC2he+NoXovLX/o37Ds0PqquX1zY3bjwmC+cC2NZgaRT/98EWvXqu X-Received: by 2002:a05:6402:4443:b0:45f:ca04:719b with SMTP id o3-20020a056402444300b0045fca04719bmr9759839edb.171.1667151342419; Sun, 30 Oct 2022 10:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151342; cv=none; d=google.com; s=arc-20160816; b=QDQP17XOFZtYmyNrkWGrJYWXVbav0bUceb04VBQj5pxUkjXbxz7SwU6rekSJj03ioT Egd7HjqABuzkHSSYOMJBk0lRMjLNP1ry0UBM1QerPMA0K9biHVt7i3BJzHijzeDSyqe9 YI2d4kGECjYTBAVj9WHPA1OOFqvcV54M9u3O/oN0iLfmxXQ6jzTpMnzZjqODaM4XAUOU B4sX3z3JN2HU+pnGNPB5L759YqNfzOg7LaU4NI21PNlqwdwcxHgsIUEAuMXvvJHDUgBa w13+xl4Z/Wlb+YCxSkPGL3vRKU8AGuLbNAVkGwOTtcXZ3iwJ2ZbZonZ/FdxzQCsvyW87 Sh4g== 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=CKCwp0k3yOlqW29QYFcw+Ie0khMK4/o/shwmMiht4oY=; b=VY6kX4rrIOJRLFx0KXkr8L/8W/rIATizwZJLgUBSMIOBEzblQ0LtbvqniF3tkDbsp4 zj1Tf11pBOZt0QEK10OsnvOy3i/ci5GrYInWHyljFcArOpsz1K2W8BvWRjMRFnlmg7XX f+g/Q1CRcDfCHxyiUxgD2NM8RFHCd+MqHaNoC3SobVOPMGUTC6J6cQk+ySWcV12UcyrM h9/WE5m0UWtTOgDqSuJ0NMNoJ5xwt05AzzCeUJzXwE+H8FeFCsdeYwEbVrski4W151b5 Ir7AWdrj/tJkTOPB3qZ8zjV56DMxWkz/nkyb3UBqFvxwLT9fGd9qkaNACmvFELP4bKt+ fipQ== 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 sg39-20020a170907a42700b0079e1916c11asi5688030ejc.703.2022.10.30.10.35.19; Sun, 30 Oct 2022 10:35:42 -0700 (PDT) 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 S229875AbiJ3ReG (ORCPT + 99 others); Sun, 30 Oct 2022 13:34:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbiJ3Rdv (ORCPT ); Sun, 30 Oct 2022 13:33:51 -0400 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 76953A450 for ; Sun, 30 Oct 2022 10:33:49 -0700 (PDT) Received: from ipservice-092-217-067-184.092.217.pools.vodafone-ip.de ([92.217.67.184] 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 1opCBs-000469-4C; Sun, 30 Oct 2022 18:33:44 +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 v2 04/13] staging: r8188eu: make OnAction_back static void Date: Sun, 30 Oct 2022 18:33:17 +0100 Message-Id: <20221030173326.1588647-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221030173326.1588647-1-martin@kaiser.cx> References: <20221030173326.1588647-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?1748134885787328207?= X-GMAIL-MSGID: =?utf-8?q?1748134885787328207?= OnAction_back is called only by OnAction, its return value is not checked. We can make it a static void function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 13 +++++-------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 88600f62ffb4..779c022b1c50 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1481,7 +1481,7 @@ static void OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame) pmlmepriv->LinkDetectInfo.bBusyTraffic = false; } -unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame) +static void OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; struct sta_info *psta = NULL; @@ -1494,21 +1494,20 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr struct sta_priv *pstapriv = &padapter->stapriv; /* check RA matches or not */ if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN))/* for if1, sta/ap mode */ - return _SUCCESS; + return; if ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE) if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) - return _SUCCESS; + return; psta = rtw_get_stainfo(pstapriv, mgmt->sa); - if (!psta) - return _SUCCESS; + return; frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); if (!pmlmeinfo->HT_enable) - return _SUCCESS; + return; /* All union members start with an action code, it's ok to use addba_req. */ switch (mgmt->u.action.u.addba_req.action_code) { case WLAN_ACTION_ADDBA_REQ: @@ -1550,8 +1549,6 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr default: break; } - - return _SUCCESS; } static int get_reg_classes_full_count(struct p2p_channels *channel_list) diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h index ec2e9352011b..4ccdce1ad9be 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -536,8 +536,6 @@ void start_clnt_auth(struct adapter *padapter); void start_clnt_join(struct adapter *padapter); void start_create_ibss(struct adapter *padapter); -unsigned int OnAction_back(struct adapter *padapter, - struct recv_frame *precv_frame); unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame);