From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F5BC433E6 for ; Tue, 16 Feb 2021 10:14:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56B6164DDA for ; Tue, 16 Feb 2021 10:14:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbhBPKOj (ORCPT ); Tue, 16 Feb 2021 05:14:39 -0500 Received: from mga06.intel.com ([134.134.136.31]:36802 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbhBPKOb (ORCPT ); Tue, 16 Feb 2021 05:14:31 -0500 IronPort-SDR: b/yNd2HyoCGb7folJNVx6X3zZNfRf3k3afLWfjWzBdLOfj2vV3ucDnXHYhxqcEEGyEVEszrATb W3CSokmjEaUA== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="244326940" X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="244326940" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 02:12:44 -0800 IronPort-SDR: XLG93KlggrUX0euPYCsPsnILxtGtL8+XPNTCDrKysJTbdDbOj2XrG8lV2XJVFMvWM5gPX7+UqW OgqwQpk68tTA== X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="361582444" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 02:12:41 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lBxLT-005RFA-1Z; Tue, 16 Feb 2021 12:12:39 +0200 Date: Tue, 16 Feb 2021 12:12:39 +0200 From: Andy Shevchenko To: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= Cc: Dejin Zheng , corbet@lwn.net, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, helgaas@kernel.org, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/4] PCI: Introduce pcim_alloc_irq_vectors() Message-ID: References: <20210215181550.714101-1-zhengdejin5@gmail.com> <20210215181550.714101-2-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 15, 2021 at 09:55:06PM +0100, Krzysztof WilczyƄski wrote: > Question: wouldn't you need to call pci_free_irq_vectors() somewhere, > possibly to pcim_release() callback? Although, I am not sure where the > right place would be. > > I am asking, as the documentation (see [4]) suggests that one would have > to release allocated IRQ vectors (relevant exceprt): It's done in pcim_release() but not explicitly. if (dev->msi_enabled) pci_disable_msi(dev); if (dev->msix_enabled) pci_disable_msix(dev); Maybe above can be replaced by pci_free_irq_vectors() to be sure that any future change to PCI IRQ allocation APIs. Yes, I have checked and currently the above code is equivalent to pci_free_irq_vectors(). Dejin, please update your patch accordingly. -- With Best Regards, Andy Shevchenko