From patchwork Sat Oct 29 17:23:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 12754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1439673wru; Sat, 29 Oct 2022 10:25:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6p5VPh+YgaPgrb8w1DWll6hWiFbM8r+0TITqTQP9e6IreAMfCQt3PAdeDMwZoZHJVhSwTa X-Received: by 2002:a05:6a00:1589:b0:56d:2:bc7d with SMTP id u9-20020a056a00158900b0056d0002bc7dmr5196466pfk.38.1667064354892; Sat, 29 Oct 2022 10:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667064354; cv=none; d=google.com; s=arc-20160816; b=pvU5IcpX0m+kZCEUkqKm4dDADL6NyAilSV+JLzDjRkux94wwu9P1sA3YSmjvHFV/HO Iv9yOCk52Hw4r6Gpr3qz1uTsdO2u6Po1aTZua4QojkowLi/PqYmX9/4FlG914VH9QRIU gE/5ZN2txjI2SX+a7XmEZKL17KTmsvNbpwPZ24XvNYxfyFLG4v1CvAXMdwoRE0f2Jerb VZmQYVPfuAKFUJpcOpsT4HGiPHQwtCpu6FdUj/o+kPnlnIrd8SQrE5pqx508gDSfPdv0 az8YfEzZdXWTZqIyLV57P606/s8LqWFq7VlW6Zy031YlbL4e7zQT462HCZk7Ehp5P15m KnEw== 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=imZuMOpk19oa2aTG88g/PghFckseg7nD0vFNW1LmSm8=; b=bVigtcWw6Ik2fI4S64ibmkMlLQGRnEkI/11P4iAU7hVy7JkGnqLZ+UvMaT42eCZJW+ GtVS3G7Rq5qWq1siyPbRylVUjkcS5mUaanzlfklvoBKKSMzbfBTWgTGbfXrJGpS5IGpL 0dk8A4EYXFLpp2CSNAt/A5CtnvRnzFMTB0YEIbdtK0UGZe8y+bd8Bhm+A5DJu8YWkVfN 4nZ2OPuherBAjFbeecBmMiQDCSJLJhqdEoDxanyIJ5vyj4ByLrsFPANSmsdRqSH9mYmA 4UFLVzFDb1ClisJbVpE+J/Kokvif9bn1gR89OSBgg+VbWlAmpH+ZnDkuu1D65YhLU3+n alTg== 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 s189-20020a635ec6000000b0046b041e1123si2632864pgb.452.2022.10.29.10.25.42; Sat, 29 Oct 2022 10:25:54 -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 S229610AbiJ2RYM (ORCPT + 99 others); Sat, 29 Oct 2022 13:24:12 -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 S229785AbiJ2RYD (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 0A23F402D1 for ; Sat, 29 Oct 2022 10:23:59 -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 1oopYr-00074v-9L; Sat, 29 Oct 2022 19:23:57 +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 05/13] staging: r8188eu: make OnAction_p2p static void Date: Sat, 29 Oct 2022 19:23:29 +0200 Message-Id: <20221029172337.1574593-6-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?1748043673177663750?= X-GMAIL-MSGID: =?utf-8?q?1748043673177663750?= 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 b13593523fd0..0c2db015656f 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3833,7 +3833,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; @@ -3843,16 +3843,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]; @@ -3870,7 +3870,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,