Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5585531pxb; Tue, 16 Feb 2021 02:16:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYjvsZFAWuA2NNgUAZuVzE+XMFQRmkhrInlHiEGVtY+84+U6am5/Zo6Vd9cN6dua9M6f2P X-Received: by 2002:a50:aade:: with SMTP id r30mr19696541edc.15.1613470590085; Tue, 16 Feb 2021 02:16:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613470590; cv=none; d=google.com; s=arc-20160816; b=X8Hv3WfSv9FDZOzDdJ40xAhHV5EWAIR9715XYmw1Jac2IrKkGlf/LEj7JH1IFt84fW QJsMggbzsUzKUZiOSo3WEk4O46U7OGMeGtWfVYZ0fBO2MrZq41BbvgD/fCH9QjVVuTtv 19UweMet6bML3/iXMLTc/9ZFHg0qa3VNpL2NllPe3ztmmdXWnEZluMc2KgiaYK/pvOB3 EodEGUjo5XduysOqtxyn3sGduF6bD/JWPNNRo6XnSXvhWFGjTNnXbAY65qP4Ufa8efPN kp533FbpM8mC1Tc39hOD371k2e1Jsw7TMSGosVcJMT5XORUrhXHM2tPbtHSp/P6SyYuO GcFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=1X7HPvPEKsVxLwMc+8xMQDVxNHCEAk1w2//7ER74jf8=; b=BLR8vXDAUrg3lpcCyAPFpLCAo3rTehxiAqZBXEbuvb3RFV67bL8/fO4BFcn1mUuW/E QPAwT8FE5xleQfHS2CSOcqWeV2+PvA/HLGHSPaUp3qokrnO5NnDwKR0ed60N1lFcEceT Ny+Ws10fH3sbA3j2PUwrunjNUY+FXTPHZu05Bg8U4tRkfpZCvqgR1RZFHj1tGGzflHFK ICtkKjuBWI9+bFKeAwzAWPvBW2k2GeppuOmMSpG7P1yMceiHIeGarTMuuUQwbfLNFoE9 eYRgFGbSpT22uZIgvucyenkB+juevcRpiaCisqNY7fU/KbgwRHf5Cjq85th0gJ9Btlzu k/5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si13654230edi.542.2021.02.16.02.16.06; Tue, 16 Feb 2021 02:16:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbhBPKOh (ORCPT + 99 others); Tue, 16 Feb 2021 05:14:37 -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