Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1889945rwb; Fri, 2 Dec 2022 02:33:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6k01P7XSdErwqc9dsAOyxa2V5kWpdyOfbzXlb2vE71lYVpx8LULei7kf/o3oLWCauuQjln X-Received: by 2002:a17:903:452:b0:189:6574:7ac1 with SMTP id iw18-20020a170903045200b0018965747ac1mr36603150plb.47.1669977227007; Fri, 02 Dec 2022 02:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669977227; cv=none; d=google.com; s=arc-20160816; b=Q2otlwxD8JkqX+4RsN2GzAwIZppla+kJpUTKAqLlnPe/GIAlqyPKicntKqYzdh3caH 6/Psz8o9O4TEmkT1TlqGk7PeSVWFxqXx+zwed6bAp2t1m3HdQwg2lVk0EsSaUXJJ0SyK +xvrhE6fX4FK5x6RAZlSeWvstfCzvewMsViXVVxdplh67p4kjhN7IeqpLK3sPQM+543J 0++Nuxa2mIniAs72oCm78UqqM0crX6xwCr4FBN5JkKXYU9QorPY0ZD0iVkFEJU0UpwhU 2PS7PGXmBYWalr72f+fSMhLDy1rG0w9sSpV50lzrvmkaZleGHPLWGCcFnBaguM7w25AV Uh0Q== 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=j48oknXCLvpfqiDHt6BFPFjX6MffNcci/FdEyIw5zdI=; b=gIpVqPnwHPJQebziwJj8bVvcWuFkEmAAGtQ9dzey+xP2PAWS4EEM+9YQcZe9RupOZT x6NAUtNW8eMuUH/B8Y06gXMO870MSz616waAe7cs9MFqLqcQWKfAAKOw7zArQW9mUaw5 atTkhtEIrsr7vJGI8f0iv9vele7HnvM2tnkbMSDUy5cq4aa8K9KM0gxtjfQTrh7gzQF6 3/mPAjjWPZ0ed5eYsnFB33Oiz/sKNPfoX4z7KK/u/p6mc20Gu848zCrGZ0QgAOrpWBe5 cwMgb5TLmciCvFEhW8R6bAZ3+0K6/wLVbvQXfxuuwBvCAzcScqUeiKN6Tc6SCMz+Xjeq jaew== 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 k9-20020a170902c40900b001884e351466si7744407plk.467.2022.12.02.02.33.36; Fri, 02 Dec 2022 02:33:46 -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 S232893AbiLBJZ4 (ORCPT + 83 others); Fri, 2 Dec 2022 04:25:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbiLBJZh (ORCPT ); Fri, 2 Dec 2022 04:25:37 -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 57C9B5FAB for ; Fri, 2 Dec 2022 01:25:36 -0800 (PST) Received: from ipservice-092-217-087-074.092.217.pools.vodafone-ip.de ([92.217.87.74] 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 1p12IU-0001tn-8N; Fri, 02 Dec 2022 10:25:30 +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/2] staging: r8188eu: merge two probereq_p2p functions Date: Fri, 2 Dec 2022 10:25:24 +0100 Message-Id: <20221202092525.403887-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202092525.403887-1-martin@kaiser.cx> References: <20221202092525.403887-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 _issue_probereq_p2p is called only by issue_probereq_p2p. Merge the two functions and remove the unused return value. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 49e0b50b1243..cf7b39cfb8f4 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -3183,9 +3183,8 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da) dump_mgntframe(padapter, pmgntframe); } -static int _issue_probereq_p2p(struct adapter *padapter, u8 *da) +inline void issue_probereq_p2p(struct adapter *padapter, u8 *da) { - int ret = _FAIL; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; @@ -3201,7 +3200,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da) pmgntframe = alloc_mgtxmitframe(pxmitpriv); if (!pmgntframe) - goto exit; + return; /* update attribute */ pattrib = &pmgntframe->attrib; @@ -3457,15 +3456,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da) pattrib->last_txcmdsz = pattrib->pktlen; dump_mgntframe(padapter, pmgntframe); - ret = _SUCCESS; - -exit: - return ret; -} - -inline void issue_probereq_p2p(struct adapter *adapter, u8 *da) -{ - _issue_probereq_p2p(adapter, da); } static s32 rtw_action_public_decache(struct recv_frame *recv_frame, u8 token) -- 2.30.2