From patchwork Sat Nov 26 15:42:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26256 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4699698wrr; Sat, 26 Nov 2022 07:46:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QyHyvaQgCGE4WCPRXxZcwgCmeD0uAWRCINDibLfHFUw5qINkD719jX7MCP38Vi5TiVYT7 X-Received: by 2002:a17:906:1cf:b0:7bb:f0eb:a350 with SMTP id 15-20020a17090601cf00b007bbf0eba350mr9258584ejj.575.1669477599586; Sat, 26 Nov 2022 07:46:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669477599; cv=none; d=google.com; s=arc-20160816; b=xzxEFmzh/u7T0VEIeNHdysIJeBtVpSDn8jVwOhl+6rsOA9+HmikLV5QvHywRBFRJd7 6m+y+x0FJMVcqpmOu+sgnkHOTrLub9rqeyHiCcPXYeq72SXffFKJb3k/Yw1niggKkW4n MKsCnHnT/Da9ihBrYxWwtsift43f4M5W6ZK6TWF9qUBGBQJvjS9E70lqptbnI1sWD/Rz GaV5nazspE+BQJn7XQTexO1ApQGNMQdoKfb9IhUeMGqhXDERNJ8DndnSiLif1MkyDWgY Y/BFU7bj11AXPXKgOtlfEQ/INzHJcpyDzL0/7Un8n4GVa6od646qbDY+Vwq32OhRsGyA HNKw== 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=l9s9qy+3Jz4RJBog9TBfLhPJGQcanGVysYb5JzYCXSc=; b=XoKDjn5L26GYph2tVHdyxP8QOq/SyYIO9pXEDA9dfqSz3SswPgnGuucthl6PC7eqIG nuEKlcNRO1FU3FT7VVoLoHWtH3Brxv0fHNu6m/XfvEMeuc6wXXXFRX8fNBov0tTry1Jw 01VMzFxtnp+6/8vmlJp9mSjRGHegPMP3Ss3qWl3OxCHOBjvrlpx3ixZoXbf2/JaE/K1H /lfreQSkXzP8JVzOOxEL148Om+YnyND13958RiPA7i3v0TAUHx4alf3eS9gb9d76c1Dv l0fDrcDucwUHYHLilA6bgxjeocdWf6DQnw6fisMcZ1EdIUhxSDcmFZEi+zLEphmodr8y /5oQ== 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 b12-20020a056402084c00b0046187ab5c1bsi6988227edz.512.2022.11.26.07.46.16; Sat, 26 Nov 2022 07:46:39 -0800 (PST) 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 S229644AbiKZPnI (ORCPT + 99 others); Sat, 26 Nov 2022 10:43:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiKZPnG (ORCPT ); Sat, 26 Nov 2022 10:43:06 -0500 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 91B13D10C for ; Sat, 26 Nov 2022 07:43:05 -0800 (PST) Received: from dslb-188-096-151-149.188.096.pools.vodafone-ip.de ([188.96.151.149] 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 1oyxKV-0000Lt-1L; Sat, 26 Nov 2022 16:42:59 +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 1/5] staging: r8188eu: drop return value from issue_probereq_ex Date: Sat, 26 Nov 2022 16:42:49 +0100 Message-Id: <20221126154253.178275-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221126154253.178275-1-martin@kaiser.cx> References: <20221126154253.178275-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?1750574143586836502?= X-GMAIL-MSGID: =?utf-8?q?1750574143586836502?= The only caller of issue_probereq_ex does not check the return value. We can remove it and make issue_probereq_ex a void function. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 11 ++--------- drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 161cb67f7882..2f3f7da08d0c 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -4482,8 +4482,8 @@ inline void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps _issue_probereq(padapter, pssid, da, false); } -int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, - int try_cnt, int wait_ms) +void issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da, + int try_cnt, int wait_ms) { int ret; int i = 0; @@ -4497,13 +4497,6 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); - - if (ret != _FAIL) { - ret = _SUCCESS; - goto exit; - } -exit: - return ret; } /* if psta == NULL, indicate we are station (client) now... */ diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h index c46fc1a53085..720610bc8fef 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h @@ -512,8 +512,8 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short status); void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid, u8 *da); -s32 issue_probereq_ex(struct adapter *adapter, struct ndis_802_11_ssid *pssid, - u8 *da, int try_cnt, int wait_ms); +void issue_probereq_ex(struct adapter *adapter, struct ndis_802_11_ssid *pssid, + u8 *da, int try_cnt, int wait_ms); int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int try_cnt, int wait_ms); int issue_qos_nulldata(struct adapter *padapter, unsigned char *da,