Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1676685iol; Fri, 10 Jun 2022 12:22:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkfndwbOZj4npzHcnqjdzAuRuBMPnq7ptVFmCYilj+EGt8CcGCRHWI3AO9Wyk38tnrbaLo X-Received: by 2002:a63:188:0:b0:3fd:f14a:b130 with SMTP id 130-20020a630188000000b003fdf14ab130mr19849723pgb.461.1654888953699; Fri, 10 Jun 2022 12:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654888953; cv=none; d=google.com; s=arc-20160816; b=Ve5mb+ik3k+zVUmDhBtfYcbENPSHDUVXJWq6hLGZ1ERVxG8/WqUta3P+Luru4mRTgy LZ3SBOfhpwox0fVYrkYOrirTZDjMHJCeNT8Nx/cfGF03lQ22bg9JMmFcS7q+j/Eom0mz KY2y3D+ILam/g2bmnMtHbZXALeTD4U0oC/dK11EnjBdVw/arPj1aL/lvFfQ5c1VIvC6i mkuHtsYk/GL4E9NDLDFkfO8MHf03o+/+HmMsQCqU9Z4HfeCapuZjGgLQnI0inEQajZet ji/mylAJpYCdkxm1WGsrFH0gcISrYtC2bZg8UZfQJVZz75F3r3oHnzPNqGjV2ogqV48O vMOg== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=mm6gMpX7ZaYHXH/tOhhcfO8veWZe8aeTZ+xmBQDIB9Q=; b=OsoCb/CuBRYdpTVsyYEK+Nfx/mpnRhi0Y50O6T5M2gV5NYuILzQizKTW0KBrUr9Zte XBpch5vwlHtaZnfWYZenBXaNtiHxftDdx7FEYaBi38XfORBe+0lbrK0pYEihJKFghiFH chJPQi5iUfMhy+ykN6EUMAWC3GoEpA6xOqm7f0vMxA0+6/xGa8rP1Cw2ahGc4vsgR9/Q ElPJOyt/Tu1Ev5z1NiXnpsNVd48uCqQtnlpheDyXbyzqG8A1DrmjfEW6EGxbD3Nk41pd B9lZDQb0WnZHTmGHNmNd7hP21ca6aEfZHag04t/C7tx2q8ZjoGy8XX3/PX61/exYLiEO b0Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="X/qNktCi"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g186-20020a636bc3000000b003fd71358d9bsi23585420pgc.351.2022.06.10.12.22.12; Fri, 10 Jun 2022 12:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@quicinc.com header.s=qcdkim header.b="X/qNktCi"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345414AbiFJTKW (ORCPT + 65 others); Fri, 10 Jun 2022 15:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350472AbiFJTKN (ORCPT ); Fri, 10 Jun 2022 15:10:13 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 562AEBAE for ; Fri, 10 Jun 2022 12:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654888210; x=1686424210; h=message-id:date:mime-version:subject:from:to:cc: references:in-reply-to:content-transfer-encoding; bh=mm6gMpX7ZaYHXH/tOhhcfO8veWZe8aeTZ+xmBQDIB9Q=; b=X/qNktCi6zg0wF5yp0ARAsol8aT56AfQC1/FsHiGkzW19Mco830GQnJg 32p42+A+yPbobbLxXuB5PpgH3jhYFo0w4itWRfBtuaiLhS2/nqRuRI8pV XNXlHQXXCmqIWCyv6joioMPC+2bXYhbiecL8L63lpZ7DxTmr2sfB2mIB6 8=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 10 Jun 2022 12:10:09 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 12:10:09 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 10 Jun 2022 12:10:09 -0700 Received: from [10.110.62.60] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 10 Jun 2022 12:10:08 -0700 Message-ID: <376b3413-c584-192c-756d-609f7c55d742@quicinc.com> Date: Fri, 10 Jun 2022 12:10:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] ath6kl: avoid flush_scheduled_work() usage Content-Language: en-US From: Jeff Johnson To: Tetsuo Handa , Kalle Valo CC: linux-wireless References: <8de85fd9-50a1-aad7-86f7-24834be8bbc0@I-love.SAKURA.ne.jp> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-wireless@vger.kernel.org On 6/10/2022 12:05 PM, Jeff Johnson wrote: > On 6/10/2022 4:12 AM, Tetsuo Handa wrote: >> Use local wq in order to avoid flush_scheduled_work() usage. >> >> Signed-off-by: Tetsuo Handa >> --- >> Please see commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() >> using a macro") for background. >> >> This is a blind conversion, and is only compile tested. >> >>   drivers/net/wireless/ath/ath6kl/usb.c | 29 +++++++++++++++++++++++---- >>   1 file changed, 25 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath6kl/usb.c >> b/drivers/net/wireless/ath/ath6kl/usb.c > [snip] >> -module_usb_driver(ath6kl_usb_driver); >> +static int __init ath6kl_init(void) >> +{ >> +    int ret; >> + >> +    ath6kl_wq = alloc_workqueue("ath6kl_wq", 0, 0); >> +    if (!ath6kl_wq) >> +        return -ENOMEM; > > this approach means the driver will always allocate a workqueue even if > the associated hardware is never present. > > did you consider instead having the allocation take place within the > processing of ath6kl_usb_probe() and the destroy take place within the > processing of ath6kl_usb_pm_remove()? typo: ath6kl_usb_pm_remove() => ath6kl_usb_remove()