From patchwork Sun Oct 30 17:33:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13018 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1893825wru; Sun, 30 Oct 2022 10:35:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Ivlyx9MIObVHAQiMnyRrV0nndr/ye9RxRCk4wKqaw1Jcv89i88RfqjMzUtr6AhHVxNgIe X-Received: by 2002:a05:6402:754:b0:463:67da:3dc with SMTP id p20-20020a056402075400b0046367da03dcmr226020edy.386.1667151330861; Sun, 30 Oct 2022 10:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667151330; cv=none; d=google.com; s=arc-20160816; b=utXjUG+4UrIfCEcoq5ROU0cgv1YAmk1fTfun9jPXbgvJwlaTcJcSHi1xyXu31gUrdh bxRbw/HcoQjvnc7IMHsXER1KJNQb8+xr7nasfOOwIWvW7+h1Nr6LSgWC7xSXMm/c5cy5 T4Ttbv0nI/0y9Op66pTElmAiWw0CUEhf/KM63+9vaqwXHgYrs3nzy0b53O/NfBsWTxzm r9QwUIOdppon2Y70tETmsY9vttSU6rmfud70infk55uwEzWnkPIFml/Vw6xRv+6jJyEt b6Au4bZ00Yl5svrLz8Mb+x+Vr2vAixfw4Xky3RcQ2OZCmV07hro6UIiz+Tavsxa1wLUF aJ5Q== 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 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.07; Sun, 30 Oct 2022 10:35:30 -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 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?1748134874044668358?= X-GMAIL-MSGID: =?utf-8?q?1748134874044668358?= 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);