Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp2063447rwj; Sun, 30 Oct 2022 10:36:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NSLs17hJqXEKy24LPl5rVSb2mVgTzcLRwa0gcO2txNXoRzPRAMxUJlCaBtkCLWgk3BnEd X-Received: by 2002:a17:906:844c:b0:78d:ce8f:fc81 with SMTP id e12-20020a170906844c00b0078dce8ffc81mr9211868ejy.128.1667151380416; Sun, 30 Oct 2022 10:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151380; cv=none; d=google.com; s=arc-20160816; b=Alus2FS/WEaz/RbTUpZ09DT2aMlJ3mn1ZVKCmeqlRXXouGhO/PkYRoJUFoy+WtJLtN 54ag6/WoTE9rdFkqdPafSQQMgCnwjkyWkea5Zt8IT3KqoqkwQx3i2J8FOkD9cSYQbWqm unoaJR+xiel9c6KaTWiLDOjWYcw7twBWwY2NaDOIJ4HCR8Vku2KcTTAuBS21nHO8Bvc6 UOPfNA3Fg/8z6XFquqzEI9iZLBNc2J12mD5pAKbt2vmBfaWS7MyQ7latlr/BFZVf7mVA 64RRlzDmWURVqXKbUlFp+GeD69SBhcL88S0VpmS0n/yReyBhAFt9vtrhkawOf+n4BASe MYSQ== 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=xCEcp18//YE086VSvtL86zS8Pm8mPtasIbifESGLIJI=; b=JlTidy822rIlkG8loPmzIUa7Z/53TGcpIdRlTcskIpS3IVzLXPdkUh0fnFBAU9FWcr X5cSgy3JEY2C7S6Kh6IIBCTus/NsTJEG3aVr9DUpV8UmMAnpAXtu3q+QkIm3XLO+R42V 2NbQYFl+5msgvT0jkUFZwO4L/dpd9fX+enHBlQY9iWV9yucq1+QoIEPVHkMH3/fV3Vsr QItYGxNQsmqCdMxWd50zzy658i1xo9lHmbwVQwOV3MvijEUE11UHPKKUx+GNYpUpwV/E rIlRT0xtAL/oVD6pCAIZ8uSI3pnfvT9u4foAUadqwK7ULnPrArAAI+qcE+ak20EA+dYq ngtA== 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 qw23-20020a1709066a1700b007adb388df38si5656944ejc.706.2022.10.30.10.35.55; Sun, 30 Oct 2022 10:36:20 -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 S229912AbiJ3Rd6 (ORCPT + 99 others); Sun, 30 Oct 2022 13:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiJ3Rdv (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 41772A44D for ; Sun, 30 Oct 2022 10:33:47 -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 1opCBr-000469-CG; Sun, 30 Oct 2022 18:33:43 +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 , kernel test robot Subject: [PATCH v2 03/13] staging: r8188eu: make on_action_public static void Date: Sun, 30 Oct 2022 18:33:16 +0100 Message-Id: <20221030173326.1588647-4-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 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. The ret variable is no longer needed if we don't return a value. It can be removed. Reported-by: kernel test robot Signed-off-by: Martin Kaiser --- Changes in v2 - remove ret variable, it was written but never read drivers/staging/r8188eu/core/rtw_mlme_ext.c | 12 ++++-------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 7d4f208d161b..88600f62ffb4 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3813,30 +3813,26 @@ 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; u8 *pframe = precv_frame->rx_data; u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); u8 action; /* check RA matches or not */ if (memcmp(myid(&padapter->eeprompriv), mgmt->da, ETH_ALEN)) - goto exit; + return; action = frame_body[1]; switch (action) { case ACT_PUBLIC_VENDOR: - ret = on_action_public_vendor(precv_frame); + on_action_public_vendor(precv_frame); break; default: - ret = on_action_public_default(precv_frame); + 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); -- 2.30.2