From patchwork Sun Oct 30 17:33:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1893764wru; Sun, 30 Oct 2022 10:35:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7QHfIp2GiY7dctGcgcPjyPa1GhB/ttoJYsacdjUnmf+5PzPXh8qF4W2ohuEAR+ECm49Piw X-Received: by 2002:a17:907:320b:b0:780:280:7b72 with SMTP id xg11-20020a170907320b00b0078002807b72mr9478087ejb.146.1667151322736; Sun, 30 Oct 2022 10:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151322; cv=none; d=google.com; s=arc-20160816; b=UT8gB/iY89myg/QvIsVYHMw4I/gCLyDIVniB5lZbN4caayclXL6lNIW/BbF65OPnUh 9kEWWPyGQo8EJmUUXqf9d+VHTm+Y5DcaBo1KTjc25lztV65esk+vNtpJj5VoIU1kGV0X WYVL32iGpTDUrtPtzAFa6Lf+ATwp268Sn1NyK9qQILpzkdCPScdJxWOAjKvbCNtjMods 3XyBO56bmSuG0EpYH9E3EAom4pz6yX5fcu1mjbHMn/zM93auzJWuVPwkG92J8uEgqb7F chnj6T6nUWDsACPiiLH+C8JMLWXF9p4xIWd2kgKTGbxQ1TQtqynCYetc3rwso1bHaAoc nZQw== 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=qyba2Ig+jVP7BUOA36O0mPLoBBSVzNOJG+c6hudpY88=; b=BUfyi0RUUbURc1ltVimmGXn+no08bfLiG4fVaAwBChE4jHZav31FwtI2YtPQ/SlLZR iLFE2mW5kB9aaqm1fyLcDY+PjeMoxmAolYyC4sGJs8drS9DMRuX8wIakttn678pq2t4R VsTbpkgjqnr76kOIK1NHw1U/JIz3w/y9W4Xsx7hBmMh7Wl/sb0leBwlus1A2EUoizsgd l5v92ajHcOsWGXmGlg6zxd2mPIRCDS7TPp3gKIyhMCzv7GLrxg62AJ1XDN4dFipfUF4k Rdg/pO0ROmKd0LmZm0r4DWcHxJyETl9/B+2dmr1dIL4zQ7E/VbIJ1KWsPNpC3exrPDtz Ht4Q== 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 q22-20020a056402033600b00461d9b46883si4683241edw.519.2022.10.30.10.34.59; Sun, 30 Oct 2022 10:35:22 -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 S229885AbiJ3Rdz (ORCPT + 99 others); Sun, 30 Oct 2022 13:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbiJ3Rdv (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 6E8D2A44F 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-TO; 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 05/13] staging: r8188eu: make OnAction_p2p static void Date: Sun, 30 Oct 2022 18:33:18 +0100 Message-Id: <20221030173326.1588647-6-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?1748134865555326032?= X-GMAIL-MSGID: =?utf-8?q?1748134865555326032?= OnAction_p2p 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 | 9 ++++----- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 779c022b1c50..f1054192bfb1 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3832,7 +3832,7 @@ static void on_action_public(struct adapter *padapter, struct recv_frame *precv_ } } -unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame) +static void OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_frame) { u8 *frame_body; u8 category, OUI_Subtype; @@ -3842,16 +3842,16 @@ unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fra /* check RA matches or not */ if (memcmp(myid(&padapter->eeprompriv), GetAddr1Ptr(pframe), ETH_ALEN))/* for if1, sta/ap mode */ - return _SUCCESS; + return; frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); category = frame_body[0]; if (category != RTW_WLAN_CATEGORY_P2P) - return _SUCCESS; + return; if (be32_to_cpu(*((__be32 *)(frame_body + 1))) != P2POUI) - return _SUCCESS; + return; len -= sizeof(struct ieee80211_hdr_3addr); OUI_Subtype = frame_body[5]; @@ -3869,7 +3869,6 @@ unsigned int OnAction_p2p(struct adapter *padapter, struct recv_frame *precv_fra default: break; } - return _SUCCESS; } static void OnAction(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 4ccdce1ad9be..ce5b57e23e53 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -536,9 +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_p2p(struct adapter *padapter, - struct recv_frame *precv_frame); - void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res); void mlmeext_sta_del_event_callback(struct adapter *padapter); void mlmeext_sta_add_event_callback(struct adapter *padapter,