From patchwork Sat Oct 29 17:23:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1439445wru; Sat, 29 Oct 2022 10:25:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7H9QroQTLGIwF8hHstwUwyupZe+WZQ3yMVT0ZCUEX53sSNPBNikLuxaxm0Tl8JX843VDsJ X-Received: by 2002:aa7:96c7:0:b0:56b:c569:99c with SMTP id h7-20020aa796c7000000b0056bc569099cmr5587712pfq.4.1667064309665; Sat, 29 Oct 2022 10:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667064309; cv=none; d=google.com; s=arc-20160816; b=RX7yoawh/CvxOWr7iJJs5RhfPOLtIntqf0hR1z3ZV75Kw/zsVrfNRJrJ/PzistO7Mx PnonP+nDaib+L5fsev59TPj77g8TVlL3F2sYX3Ep8t0YIDnltZGgbaptTW+YyLxmCSI2 PjAADSUJ0zFbqKiBRcPp1mJ+yNg/PqE/eW26PYRLEUAVXE2zT10EFuH3PLdJTVniEWae FXsHxrrSMahPCiwu5/Gw9mqpbsueXVevyZoOch9FCUJZkNeiN22Czj9VDQY2xTtVs0lt CcxSpk3Tl4hNp5ZDNQEpfVk4pcMo8U35iAh7hgmuZ2XjyEKKX11bBJx9fRefzGWRhBNn GtEg== 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=bXFd3Ix7kOj7CNBfVVlExclB3nWxC9cfg9NT3nZbvSg=; b=WIN9uM8loUcmpB132NSN+7aUudMSoX4yNK7hP/mZlEr5XuL/wa1fWG8xZNNb020Byl 6d8RWUPVGt2aal7X0cvLr1mib1mSutQIEA5D0QAF8AGvoRFIABuaVXVjaNqK2U3dSeFS p9e4svciX0+D9SjZg9UrFoJSfdx0B5GehKF16rOthIW7M94eqzihYYZc/QOh7aToPuAA am9qmKNW8z/12YW3xxkl8Wxh6x+23v5YA380UkKRArecT58wiaykkEqfcY/ZsH26KIEd l74iJmxkdw6ZP2ewu3HiMVi5gV25Oq0xJemRdtPPrQR0g1pe3ulB+X2KqjpvzVSS8bd2 UdoQ== 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 z8-20020a170902d54800b00180556e1b6bsi2247465plf.609.2022.10.29.10.24.56; Sat, 29 Oct 2022 10:25:09 -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 S229915AbiJ2RYQ (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbiJ2RYD (ORCPT ); Sat, 29 Oct 2022 13:24:03 -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 6F6C340E01 for ; Sat, 29 Oct 2022 10:24:00 -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 1oopYp-00074v-NW; Sat, 29 Oct 2022 19:23:55 +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 03/13] staging: r8188eu: make on_action_public static void Date: Sat, 29 Oct 2022 19:23:27 +0200 Message-Id: <20221029172337.1574593-4-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?1748043625218612702?= X-GMAIL-MSGID: =?utf-8?q?1748043625218612702?= The on_action_public function is called only by OnAction. This function also lives in rtw_mlme_ext.c and does not check the return value from on_action_public. We can make on_action_public a static void function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 ++----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 7d4f208d161b..caa73f16dbf9 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3813,7 +3813,7 @@ static unsigned int on_action_public_default(struct recv_frame *precv_frame) return ret; } -unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv_frame) +static void on_action_public(struct adapter *padapter, struct recv_frame *precv_frame) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; unsigned int ret = _FAIL; @@ -3823,7 +3823,7 @@ unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv /* check RA matches or not */ if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN)) - goto exit; + return; action = frame_body[1]; switch (action) { @@ -3834,9 +3834,6 @@ unsigned int on_action_public(struct adapter *padapter, struct recv_frame *precv ret = on_action_public_default(precv_frame); break; } - -exit: - return ret; } unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame) diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h index c8beaa927cba..ec2e9352011b 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -538,8 +538,6 @@ void start_create_ibss(struct adapter *padapter); unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame); -unsigned int on_action_public(struct adapter *padapter, - struct recv_frame *precv_frame); unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame);