From patchwork Sat Oct 29 17:23:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1439500wru; Sat, 29 Oct 2022 10:25:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FJDKISMqS25dYmd7Dw61pn/7vsVKMUvnPbN7GOYnntHBA4HtmbzC1sIP04bGKC1XBsU/P X-Received: by 2002:a17:90b:4a92:b0:213:54f:ddd8 with SMTP id lp18-20020a17090b4a9200b00213054fddd8mr23239898pjb.234.1667064323352; Sat, 29 Oct 2022 10:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667064323; cv=none; d=google.com; s=arc-20160816; b=ENjE0Em6CdpG6G/sopzUK8bQrkiiRXf+rCXIEF/Wa9SkwZm0PPjeOyblyE3ZdalRuN JPbdYz52qh/k2VwV9bZ305sJ7Zgm0m/5aW5CeFlFMtKFET6LDbVKvnlYQsJfeR8TQEBw YEdgLrr5TOk60MIUhrk5iJModYgWRYMP1Er5AFGAeek4TTQC4dwSzg7dkl7/sLYX6qcQ rGyWxhaXqeHYdDSN6bssj0spQC35GEx5F9bMdI/xdL0N5pKQatDadfvXckDSYp71IuNx mGP/clp/kXmOEYke/YjVtpeOIY5FtMwdtAKhyvUhwddbyiucZYFptjdM7auXiNu3a/xy 5ntg== 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=l05IXPt2sLdwVAHDMO3mhiRA234Z7R9DYZO8oEC2y8w=; b=OVPrnUHcko/TPmTwRSF+q31X7xHS5gtbcNQ7mKMzN83AnLeTgxQPaaalvTkvrw7HQO QG66eV4tRvL4X+lxInSPw7NsW2dP2qd9oBKWEZ/MCoJ7OcuoPRf0DlZj4eKcVBC9EUuT K1RHk27Caod9SWGGLJQVYdc8hhW5/5p+TJ96EYauQ1mJpQx/D5/ZCxRxVGDT17sP7iPs dZjmzNDK6uOQrSmpx6z7IisTB2Ob3kOS1DNDNK+FfRH8hxWf7mhgL4gPYO3EjbCiojU7 ul1x73kxZanyAP9hjQL5Z5lskmEbz/sXuVT39Z2ThQK2UD1V94atjGMhqebW1hnFxil7 Hd1Q== 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 b19-20020a170902d89300b0016ee19bc5f9si2160067plz.553.2022.10.29.10.25.10; Sat, 29 Oct 2022 10:25:23 -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 S229937AbiJ2RYZ (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbiJ2RYK (ORCPT ); Sat, 29 Oct 2022 13:24:10 -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 422B640E2F for ; Sat, 29 Oct 2022 10:24:01 -0700 (PDT) Received: from dslb-188-097-213-253.188.097.pools.vodafone-ip.de ([188.97.213.253] 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 1oopYq-00074v-Fq; Sat, 29 Oct 2022 19:23:56 +0200 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 04/13] staging: r8188eu: make OnAction_back static void Date: Sat, 29 Oct 2022 19:23:28 +0200 Message-Id: <20221029172337.1574593-5-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221029172337.1574593-1-martin@kaiser.cx> References: <20221029172337.1574593-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?1748043639886276321?= X-GMAIL-MSGID: =?utf-8?q?1748043639886276321?= 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 caa73f16dbf9..b13593523fd0 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);