Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2063308rwj; Sun, 30 Oct 2022 10:36:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6D5otODN3QKbKVOYkNMsAq0uRWZQiu4Vg3mOBBJHgUYEfXIkWZRaVK2S6zA7CMsAQizrwT X-Received: by 2002:aa7:de9a:0:b0:44d:8191:44c5 with SMTP id j26-20020aa7de9a000000b0044d819144c5mr9499219edv.232.1667151373447; Sun, 30 Oct 2022 10:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151373; cv=none; d=google.com; s=arc-20160816; b=aPEj3U0MREcGw5vHwPolACL8IVQ4NWaWz++M8xE/hbwowxJi9+XxPio5fuOKPqGrHi 7jVs+9NjgfV0LfWQ0U2lyVb96el2qWcRScdyzVWbtuO5bUkFR+j9lUmRYZK26on5UsOS NYzjW6mjHPDPT6mREfA3nbLY0CYqOb5wiyJGfuFS3XHSrbYcxMLZ9zcnvLmMCgIfCLJG HeGgQfQko0VYmr476lJpk/HlcuVUzUhHmSGFUWFbMH1TVkf4IteGDjmZWKpTfuZ6odM9 M0zjhsFt4+kTRpgVnaogjOa9OH2N/WU4xn70uCfsyZrl1yo135gm3QZvfwMC/EpxCwsB 7oHA== 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 Return-Path: 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.35.48; Sun, 30 Oct 2022 10:36:13 -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 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 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, -- 2.30.2