Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7556116rwl; Fri, 30 Dec 2022 10:09:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXt926Wibjux5qlmxXycfFmm8zOzeIZcI/CCD9R5mUync61zuP0rCfVqfI1bhfPz5Y+Z6ePz X-Received: by 2002:a17:90a:9304:b0:223:fcc8:d7dd with SMTP id p4-20020a17090a930400b00223fcc8d7ddmr35749948pjo.30.1672423750135; Fri, 30 Dec 2022 10:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672423750; cv=none; d=google.com; s=arc-20160816; b=zpqCn6f55r8JXtZrWgzt01ugiBpKYGstI1r+myg81txw7UyXI6LvSoK85IjVsYjZBT y7UgkxzLnQldpGJFCxI2xMSF86o9HBJ+fRN0gwdyuFWu+LB90yCosYYW7adeshxpc0v4 vcbPptBFjTzFeCpeYF2hDN++x4O4rtW/flDKWz4M4mx752fRadrp3S4kwlZRZ0eSlZR0 rULaM76+Mehp5UwVxijxVc1S/mcz7nXtd/0gqkkJs8BEEbLefT/J1FCB5ZGYh0m7pwMO ATQHpt5Z9I856PXAkHp41x1qtYQmuEqaPtAnMs73RPO2t0t6NLL1L9OpxyX9S/yLmbdJ r34g== 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=rLMTyswHMdazjWN3u0Tm9OUy6TD5valgeQaae4MY8bE=; b=ZNysHplHz4tMQHbVc9kPsCfbXw+ZuUrbiO+e3kRsc7fF0XkonmifY2TrocCo+oQZga p/XmfFr1Xax4spZS1Ok0dObib71+laIAFVtghKptAov1O4/K4A9+ZomCHPzANK+5eA0f e8GhNJRLjwqV1lDKpQiWtUH/tBR5PUERy+xIWQ849WZGbylteuHJi/NOTC3cHsHQjS4q LWxIm7Gj7BtUHuMEYbWWL0uZBzo7vMAAcl8vKd9TrCMW8xpWXZmSSQWn6B19yoQGQZQB z4oqO4e8ozha3cIMh2dMG5EhrzlUHzRTIZ5qRG0UEIOU622BJpPkQp24BB7+Kklkj1JZ Tsww== 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 rm1-20020a17090b3ec100b00218592c28casi27777564pjb.33.2022.12.30.10.08.41; Fri, 30 Dec 2022 10:09:10 -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 S235475AbiL3SHf (ORCPT + 63 others); Fri, 30 Dec 2022 13:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235432AbiL3SHR (ORCPT ); Fri, 30 Dec 2022 13:07:17 -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 AFF1E13F05 for ; Fri, 30 Dec 2022 10:07:16 -0800 (PST) Received: from dslb-188-097-208-179.188.097.pools.vodafone-ip.de ([188.97.208.179] 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 1pBJmg-0004rR-Oj; Fri, 30 Dec 2022 19:07:10 +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 06/20] staging: r8188eu: simplify rtl8188eu_xmit_tasklet Date: Fri, 30 Dec 2022 19:06:32 +0100 Message-Id: <20221230180646.91008-7-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221230180646.91008-1-martin@kaiser.cx> References: <20221230180646.91008-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 Simplify the rtl8188eu_xmit_tasklet function. Remove an unnecessary temporary variable and reformat the code. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/usb_ops_linux.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c index c51f860d3527..a238d29a3a46 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -481,22 +481,14 @@ u32 rtw_read_port(struct adapter *adapter, u8 *rmem) void rtl8188eu_xmit_tasklet(unsigned long priv) { - int ret = false; struct adapter *adapt = (struct adapter *)priv; struct xmit_priv *pxmitpriv = &adapt->xmitpriv; if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY)) return; - while (1) { - if ((adapt->bDriverStopped) || - (adapt->bSurpriseRemoved) || - (adapt->bWritePortCancel)) - break; - - ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv); - - if (!ret) + do { + if (adapt->bDriverStopped || adapt->bSurpriseRemoved || adapt->bWritePortCancel) break; - } + } while (rtl8188eu_xmitframe_complete(adapt, pxmitpriv)); } -- 2.30.2