Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3635355rwb; Tue, 8 Nov 2022 06:49:44 -0800 (PST) X-Google-Smtp-Source: AMsMyM4kE5UwokXEF6Ks2qHOMbkVkESE3AVJlD+RISaz/aM/+npDIqTtmps9pXUGHfkU+Jp4dCxA X-Received: by 2002:a17:907:6d8a:b0:7ad:d3a1:cbf6 with SMTP id sb10-20020a1709076d8a00b007add3a1cbf6mr42514614ejc.533.1667918983837; Tue, 08 Nov 2022 06:49:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667918983; cv=none; d=google.com; s=arc-20160816; b=pWgu2mJWwBjo6yqO4OKQpMg+tpA80bpeSRN9wt1tqSbvCbuA5WS53K/DIMCDmrT3/8 VKXqrGLTCwyEC/wjjTqpDtE7sjd0vpD6girKLg0aszuYFiHfddLX9d/bACldaEXg9Qmp Z9ni9BvB8X2dHZxUeY+xxTl6Isd3Zz6RCK3ctoDA+4BqK5ZQ3Skvn3uGy88x4gbASptv 3hkIzLd6Ll67BK05K8c+mGL7hR1zvJbp8ir6tAN+jHeGpRpXNNZAR647AJr0lUYg4xkZ Wp7OWCgVTd5jEaJ83WoSCCIJ7LizhmDSxOL2MJZD8i7oSwH5C1M+3swhnPieI7/1Oxne hwkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=TxadhRQHZXkAfvaaDvdmNzfCRp3DJPu3ROX9xX8EXm0=; b=NcWl6IonhBzk4TAXymJFlUl4hLd+oMjbfo+4emUI2Dnz3NTqjZKk6lsGk8jLWRZ3WB u6W1/2GAZy3v8VHI4iPpANvyw0jHPS7xoUnEjTswPL9+fYbX4jGG3uAVOEgnxibRY+OI f7Nyk8kjDzgb2O9uZ8B3hk/pyq33X5z8NuWEzMJGt6wTPUnqTcc807E4gW+i/BtWW3Ar an8V5E96/aix0XswXsGMyyL+oYa0Rt3pUGz1jAS+fiqteXm8dF3VbdDochsCwdtzPkSc wtaI2VulPEwDxgLPzNkF7/iA5BIS0TRka9TMKHlMAB7mYJLNBghHxVg5lKTpke9w13h4 2WfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wqa17tY9; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs10-20020a170906dc8a00b0078bb4d5db86si13358175ejc.77.2022.11.08.06.49.24; Tue, 08 Nov 2022 06:49:43 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Wqa17tY9; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234151AbiKHOpy (ORCPT + 67 others); Tue, 8 Nov 2022 09:45:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234800AbiKHOpo (ORCPT ); Tue, 8 Nov 2022 09:45:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21AE210A8 for ; Tue, 8 Nov 2022 06:45:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BC205B81B08 for ; Tue, 8 Nov 2022 14:45:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81372C433D6; Tue, 8 Nov 2022 14:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667918740; bh=2kooCGud+rjaS6L4Gd38qK6vl6TzkcqcMznVDB1kckk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Wqa17tY9DUXPi1vEdkphMT+axzdEDC3HrORIIEzjpzy3ODMARrJ4UmUfF4laAiyaW 8ioN1T1zlk7BUeQjoXsgec9ZPr7xcl57YgJdjEM+KRrPRJ+xMQb3whcBS331dfoLVt buxvPQYZNESDcT+RRRQY0eNERL+dA1mFzApIWgZ/cuQbzyECkJNq9AvhGYIi6MsQnP 1D8guavBxaU1JA/wBjBsFVGUJ9oy+GwJlafR3M6CAEvvAMNTsY/7Mietj8E6jhKyFH f4B9xAHF/wmjHb3S+9MY3RjkvQz8IusMhqzOOzcPJelScgPge6E/pCEg27D1AxFPb2 g8l+asUZCiBLA== From: Kalle Valo To: Jeff Johnson Cc: , Subject: Re: [PATCH 35/50] wifi: ath12k: add pci.c References: <20220812161003.27279-1-kvalo@kernel.org> <20220812161003.27279-36-kvalo@kernel.org> <7b06d248-c976-6c9f-4d5c-5dec7b1d5511@quicinc.com> Date: Tue, 08 Nov 2022 16:45:37 +0200 In-Reply-To: <7b06d248-c976-6c9f-4d5c-5dec7b1d5511@quicinc.com> (Jeff Johnson's message of "Thu, 18 Aug 2022 16:02:14 -0700") Message-ID: <878rklec8e.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Jeff Johnson writes: > On 8/12/2022 9:09 AM, Kalle Valo wrote: >> From: Kalle Valo >> >> (Patches split into one patch per file for easier review, but the final >> commit will be one big patch. See the cover letter for more info.) >> >> Signed-off-by: Kalle Valo >> --- >> drivers/net/wireless/ath/ath12k/pci.c | 1344 +++++++++++++++++++++++++++++++++ >> 1 file changed, 1344 insertions(+) >> >> diff --git a/drivers/net/wireless/ath/ath12k/pci.c >> b/drivers/net/wireless/ath/ath12k/pci.c > > snip > >> +static void ath12k_pci_remove(struct pci_dev *pdev) >> +{ >> + struct ath12k_base *ab = pci_get_drvdata(pdev); >> + struct ath12k_pci *ab_pci = ath12k_pci_priv(ab); >> + >> + if (test_bit(ATH12K_FLAG_QMI_FAIL, &ab->dev_flags)) { >> + ath12k_pci_power_down(ab); >> + ath12k_qmi_deinit_service(ab); >> + goto qmi_fail; >> + } >> + >> + set_bit(ATH12K_FLAG_UNREGISTERING, &ab->dev_flags); >> + >> + cancel_work_sync(&ab->reset_work); >> + ath12k_core_deinit(ab); >> + >> +qmi_fail: >> + ath12k_mhi_unregister(ab_pci); >> + >> + ath12k_pci_free_irq(ab); >> + ath12k_pci_msi_free(ab_pci); >> + ath12k_pci_free_region(ab_pci); >> + >> + ath12k_hal_srng_deinit(ab); >> + ath12k_ce_free_pipes(ab); >> + destroy_workqueue(ab->workqueue_aux); > > it seems strange/asymetrical to destroy this here. > > it was allocated in ath12k_core_alloc() so I'd expect it to be > destroyed in ath12k_core_free() to maintain symmetry Fixed. > in addition I don't see ab->workqueue being destroyed, and imo that > should also take place in ath12k_core_free() for the same reason This is also fixed. >> +static SIMPLE_DEV_PM_OPS(ath12k_pci_pm_ops, >> + ath12k_pci_pm_suspend, >> + ath12k_pci_pm_resume); >> + >> +static struct pci_driver ath12k_pci_driver = { >> + .name = "ath12k_pci", >> + .id_table = ath12k_pci_id_table, >> + .probe = ath12k_pci_probe, >> + .remove = ath12k_pci_remove, >> + .shutdown = ath12k_pci_shutdown, >> +#ifdef CONFIG_PM >> + .driver.pm = &ath12k_pci_pm_ops, >> +#endif > > conditional compilation is unnecessary here since SIMPLE_DEV_PM_OPS > handles the conditional Fixed. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches