Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1667388iol; Fri, 10 Jun 2022 12:10:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJOl3nKlHqHdj0rvkwqnZeun6aPiauwpWBD91z0sGGun3weqdevW2zTRp9ZGlCpgQFf0V8 X-Received: by 2002:a63:3193:0:b0:3fe:3f57:35fd with SMTP id x141-20020a633193000000b003fe3f5735fdmr12967575pgx.232.1654888229361; Fri, 10 Jun 2022 12:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654888229; cv=none; d=google.com; s=arc-20160816; b=CvWcm6y7BR4y4Cr+K5kkbVneyGLOz5/ndFvDhm/YLzHJkjwQ18RiebJperioBs75+b k+q1Q4Lh+jq1UubG9ZffmIUs1pMg1w1bp0kcbsk8DWdUa74ewd3yjKHDnxuxb7WpDBNZ oyB9/kx/NXMwM53rNh/++PuYv1nD4WLIfIK/+FZaWK2f1HIrlaWkb2AhhV93Z/IOFFcK l3BPQiEXGu2EypAhBk24XonsjLWT1QOJWOBN4sk4RYxgGKChjpLEhtWg7tiwu2oQx5R/ CizWezeETadLJ9RXQfwiA6UNiV2DyxWBSMiDoSa0X/7aLsyR7YcPhBPQJl/SiqBTuRZ1 twVg== 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=WcNP8Zci1YeJ0fXtgw0zSRqLoLysFLUSChqs3oYyy2Q=; b=N79n8391NglWmPlXIwgc+CyiGGAiAFc/KmSjpiAsRGzUKGtWP8h8sE82M2Ekzsktmc KIFfYpQaNPr5uGEr2/F3ulaGliOKj35QGgeEdoCpxtZfFJYajOav9GFKxvnqh9lEaykq MnvqbKIrE7dI46sNK15t2w1ObZgKaGli9IJ3radDbPmVparI57QXne//UFP+MeDEDitj bFXaA5ix9gyfpamXYoPuUBLFvaRvwGPVEh/xL/ZGr7R+HfuN6dd5dOtthusEjrAtKFfK 0Qf+ssN+iRh1YBUF7Uw4btZGHDbVJ8ttC54h1MyT2yQgH+VwFDIdTciH6g8ZNkN3HYeP GlJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=x7lRaTXx; 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 x3-20020aa79a43000000b0051c6c473a94si9332362pfj.107.2022.06.10.12.10.14; Fri, 10 Jun 2022 12:10:29 -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=x7lRaTXx; 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 S1345405AbiFJTFW (ORCPT + 65 others); Fri, 10 Jun 2022 15:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350190AbiFJTFV (ORCPT ); Fri, 10 Jun 2022 15:05:21 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6003E359FD9 for ; Fri, 10 Jun 2022 12:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654887918; x=1686423918; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=WcNP8Zci1YeJ0fXtgw0zSRqLoLysFLUSChqs3oYyy2Q=; b=x7lRaTXxOg18zIEM0QOSNg73/cRD2niKMsvK7yrkaQEI1AbuCPfweU/p mEScqN5st77w0HFZHp/ZlgKRLHsqc7DQqge2nfRHNFioNn52zBOe8ZA4O yRTho6vMDT1R7lbZAs6RdqEmfEwtCNlRZ204mgtcvBqHCXJC8NkzkJ2L0 I=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 10 Jun 2022 12:05:17 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 12:05:16 -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:05:16 -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:05:15 -0700 Message-ID: Date: Fri, 10 Jun 2022 12:05:14 -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 To: Tetsuo Handa , Kalle Valo CC: linux-wireless References: <8de85fd9-50a1-aad7-86f7-24834be8bbc0@I-love.SAKURA.ne.jp> From: Jeff Johnson In-Reply-To: <8de85fd9-50a1-aad7-86f7-24834be8bbc0@I-love.SAKURA.ne.jp> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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 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()?