Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2363266iog; Sun, 26 Jun 2022 13:53:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sSNyV5VU9ZAKIpQUwQ0/jioJ11S1veRycRuAV1MGlcMZHoz7Uzs8As10sRr6sDmVzJd5XQ X-Received: by 2002:a17:906:8301:b0:6e4:896d:59b1 with SMTP id j1-20020a170906830100b006e4896d59b1mr9632169ejx.396.1656276829667; Sun, 26 Jun 2022 13:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656276829; cv=none; d=google.com; s=arc-20160816; b=eYPrT8C85luJiK9mqfD2kEUINo3DQ1XHmEIJP+BKPQnDI1v6uy0IKMS6aZCRFcCyzN 2EEzOq0nul5mGjzizBFnuXGSsy5Y8Q6oiP6JVN8z07c0fL5jdtXahCvJNIvIevZOWt7v C6iLGyXZI7m1N1MEeTddFAxlsqgsanu9xmdkr14Rta8VQ8N9HCyy2M39/ncEe6s5ldAR gfxT3FEdtytQvtKORRPXxAxNOuQVow7EeYHuB7jRmTDTsEkLgJo6dEPsnjRpBpou5gBQ Tsb8mOfs0IXL9JGyhAdbJ6LpxQU3P0AQZjbEB5euVm6mtF97LLBUVcjj2OmqQjNgQVvA sxUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=+NiKnLEANxLAPhew67VDLJo2BLnUAn/GY67TsCLrKkQ=; b=S3eoe5pC3rtZIWQou5FwmTJh/xQmDtcu4g+kDtKeTwa3JnujmgZoShddlCSGaTjTJD iP/NXjmVou/1H2DtT4uUB3VirH32S5MOrljBOmZymk++xKlJju4F+POKC33c60TkQc/q 6k9Cp73L3+XaMVm1bMkgN4WlnL7faN3u3XUfOCkbudsIbKoTLOftv3S3YjB7+O7vGtsw 2sGbMdJ5s68Vtgvh1lJeMBmUIEPCmi0cxV6qCuJCI9ir+QdypnePfj6rfYa1SV56CVRt REb7bpAkvSDeruHGi5Gunwe67llPDcVxeoUP/cUqFkkQsVa3eGlBPx1oWLzuUZsTgZLQ KEsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=e0DR+7Fl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t19-20020a50ab53000000b004359a63823esi9842344edc.225.2022.06.26.13.53.25; Sun, 26 Jun 2022 13:53:49 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=e0DR+7Fl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232105AbiFZUow (ORCPT + 99 others); Sun, 26 Jun 2022 16:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232014AbiFZUov (ORCPT ); Sun, 26 Jun 2022 16:44:51 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C631EEB5 for ; Sun, 26 Jun 2022 13:44:47 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id lw20so15112564ejb.4 for ; Sun, 26 Jun 2022 13:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=+NiKnLEANxLAPhew67VDLJo2BLnUAn/GY67TsCLrKkQ=; b=e0DR+7Flsxt4JCftlM/n7rZXiVyC+6Wu49NvaZtQoeVAo+kDEbS5v+G0pLT0pdcBKZ 3CsqdXyDndrUmP+hJjly12AOjr5jVB6bnAyq9VVrUxPAjBJXcUAJLm6egZm+oUBX672W QCTYvn9hLMA373G23Vs1nAtWcwvMZ3o4YFrAj3tV7aZjKiJtBFFB8B+oV8DAuCx16ejo 9OElXexSkFUAruKSSGU7UCaf5sQdtze7H8D8BK5Cy3Yi3TlDgWJQUCzIoMgRGGucpAxy l2hPej2sc5yYU+Z9k/Cc9LRFoCAtnt3CXtgj2NHMsA4JTAieo5+t0TQfeyKiT9HX7nMG +G+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=+NiKnLEANxLAPhew67VDLJo2BLnUAn/GY67TsCLrKkQ=; b=ypQWLhxh8KX5cKl25zyQf5hwUx0WrIUVcrNQP30JPFin7bZiXbksWuZdR4LVeStxiI xa41uVNg8sw+JOYstWHvoBfhYw9XLxhNxyWL7S0HeHXpMLwfXbbyh+Rvis/6egZvWhc6 N5MNJ8TcAQkfKnEy2r7608DmRz4OsU/it7YYvfOLAdpAWDArqA8ETacscRKYxgPafEk0 pi3OxgDD2cDlVM03o548qNZqtRhoFfI/LVEHYNk3OE9z85yA2fqnXBhj3rHmpaXqX/Y8 01gn1/hydKlSqBdqZRKQbsksB9MfcDce7NCbli/SpNSYrEGPSD6NjCCjoqtdhBA7SnSs dy7w== X-Gm-Message-State: AJIora/xn19DPHCWAN07wUaMKgBdiCApJzh7H9bLOHR9XvkTFlASEqSo p+euDUVCvaSOhBItCMOkCU4= X-Received: by 2002:a17:906:66d4:b0:70f:e86d:61b with SMTP id k20-20020a17090666d400b0070fe86d061bmr9656981ejp.401.1656276286306; Sun, 26 Jun 2022 13:44:46 -0700 (PDT) Received: from [192.168.1.100] (p54a07b82.dip0.t-ipconnect.de. [84.160.123.130]) by smtp.gmail.com with ESMTPSA id y1-20020aa7c241000000b004355dc75066sm6368347edo.86.2022.06.26.13.44.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jun 2022 13:44:45 -0700 (PDT) Message-ID: <3a177ab1-5e56-e3bf-4756-4532957fca7d@gmail.com> Date: Sun, 26 Jun 2022 22:44:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2] staging: r8188eu: remove rtw_usleep_os Content-Language: en-US To: Martin Kaiser , Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220602194807.281115-1-martin@kaiser.cx> <20220626180603.287054-1-martin@kaiser.cx> From: Philipp Hortmann In-Reply-To: <20220626180603.287054-1-martin@kaiser.cx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 6/26/22 20:06, Martin Kaiser wrote: > Remove the rtw_usleep_os helper function. There are only two callers, both > of which call rtw_usleep_os(100). This is equivalent to msleep(1). > > Signed-off-by: Martin Kaiser > --- > changes in v2: > - use msleep(1) instead of usleep_range > > drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- > drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +- > drivers/staging/r8188eu/include/osdep_service.h | 2 -- > drivers/staging/r8188eu/os_dep/osdep_service.c | 8 -------- > 4 files changed, 2 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c > index 45e85b593665..cf9020a73933 100644 > --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c > +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c > @@ -273,7 +273,7 @@ static s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) > err = -1; > break; > } > - rtw_usleep_os(100); > + msleep(1); > } > > return err; > diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c > index 5549e7be334a..5b65313e0b9d 100644 > --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c > +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c > @@ -243,7 +243,7 @@ static int efuse_read_phymap_from_txpktbuf( > if (reg) > break; > > - rtw_usleep_os(100); > + msleep(1); > } while (time_before(jiffies, timeout)); > > /* data from EEPROM needs to be in LE */ > diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h > index 1d97d5be46d5..72990a1cdc66 100644 > --- a/drivers/staging/r8188eu/include/osdep_service.h > +++ b/drivers/staging/r8188eu/include/osdep_service.h > @@ -76,8 +76,6 @@ void *rtw_malloc2d(int h, int w, int size); > spin_lock_init(&((q)->lock)); \ > } while (0) > > -void rtw_usleep_os(int us); > - > static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer) > { > return del_timer_sync(ptimer); > diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c > index 812acd59be79..3504a0a9ba87 100644 > --- a/drivers/staging/r8188eu/os_dep/osdep_service.c > +++ b/drivers/staging/r8188eu/os_dep/osdep_service.c > @@ -42,14 +42,6 @@ Otherwise, there will be racing condition. > Caller must check if the list is empty before calling rtw_list_delete > */ > > -void rtw_usleep_os(int us) > -{ > - if (1 < (us / 1000)) > - msleep(1); > - else > - msleep((us / 1000) + 1); > -} > - > static const struct device_type wlan_type = { > .name = "wlan", > }; Tested-by: Philipp Hortmann # Edimax N150