Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp777419rwj; Sat, 29 Oct 2022 10:37:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61rbmWA0Zf8AgLHAGSflP95YloNTIHXzNAqLiC65bXFEg0cs7Wdm/lW3rNHndbUwWHDRzS X-Received: by 2002:a17:90a:e297:b0:212:dc30:7fed with SMTP id d23-20020a17090ae29700b00212dc307fedmr23452060pjz.90.1667065076656; Sat, 29 Oct 2022 10:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667065076; cv=none; d=google.com; s=arc-20160816; b=FCkN2AqbepdRIkG53XhAXQ0XC4E/kP9YTigbJLQmsS+NeyWUYNvp0oujsNBdCcbPor P4Bkppnv2qUoViTLarXrXzbyTpWNq11zmE4eVDG/WulwpvlCfs9MMCOQ6/NEgAL+sFdJ JtVa8Ygq5QmQCAt0+B/HB3Avh5bj9JSdX97aec5Y+NTRQQ2zJZE3ZAP+7TZC2q7L7u5+ 2aaEpgO25pgKwGRDCOh/sBvt0Ugd0KdLiUYuRVwajSu7qHi9m9CdxjB6AJZQUY0TeAeu K8Swvaik8kJNPXYd7zqcJysbuLUxfaLQ7/77JNlUN+BJ9N2dRyoz4nUXzwlipf/14jbd 87hQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k17-20020aa788d1000000b0056aafb43783si3016025pff.155.2022.10.29.10.37.45; Sat, 29 Oct 2022 10:37:56 -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 Content-Transfer-Encoding: 8bit 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 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, -- 2.30.2