Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5748177pxb; Tue, 16 Feb 2021 06:45:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGC3QrFH/gQuSdPyjVFfab3Nq1piEpD/qVHJNewVyDGl19R8pqfVfQ+vZTpVX+bKimY5IV X-Received: by 2002:a17:906:2e90:: with SMTP id o16mr15166046eji.467.1613486705323; Tue, 16 Feb 2021 06:45:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613486705; cv=none; d=google.com; s=arc-20160816; b=odY2GEUIh4x/ebBz360Ix5QupeMTV9cHRohc3YdNIA4ZojMQATEZSqFy+b/K5SHn8f RK7O8EOGwtCTF4yPYtvDIFLSg8yKetxevXJDAEyqUtDkuBogPyQ/0WrRphVQObAanARR ajvr4ADfaeBCQskU7Ji2YEsOhJGFVJ0FFANPz7gitfJTCiR6P+VLardw9L75l5vZ9wV7 wTbVsw56/JGYgD6LVjX0ax1dcmYsHmJ9c+QcZHFfGffKmWfC2ge5ry6GgYVmc7O/tek/ ryric7JfTjvK5FKlj60C+mprBZo5LBEoIfMDEUdAbVNj3r6kp/JXNsl0IcKG+ZHCPIjS 08Rg== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=YsX6N4ECNSl1BaSBM3mjo643o0SVeQo2Q/mn+0OiOgc=; b=hSz/ESxIHHg/R0dUM3n46Nmpdvv1q4BBjlHirGr5wytsNNwDuTkRBluhmg/WIYNNhK EyaV3+ppagtouaTGzPr/+uMegph30ad3+MNZyeQO2ua1zQgmSvAfHk0GEb2u6QSopctw TeK/PCRLscR1mPSnNufITiBA21ZEAgKx7mNAcmKFUMTVqIVidZM4TqL0yDCJaMzEc1BO dHXtwcWWC8BcuwWZDEnTrVw/JLgiA1aZM8O8J33of6BL4f59gfU92H/ywZNDfvKsk6bn cJN/JhKdmoXQ1XbbZOrci+GvnJOdsVlhkNieDft/GPHZHdVu6+iD90GmuGIns1Gsc6DY w1/A== 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 w10si6069658edx.104.2021.02.16.06.44.42; Tue, 16 Feb 2021 06:45:05 -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 S229827AbhBPOl7 (ORCPT + 99 others); Tue, 16 Feb 2021 09:41:59 -0500 Received: from mga18.intel.com ([134.134.136.126]:64276 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbhBPOlx (ORCPT ); Tue, 16 Feb 2021 09:41:53 -0500 IronPort-SDR: l/cd7nk06vGanIa4BlJt9cGCdjC9P6ey6oXT23dmDqYTKR9Od267hBtbJOlqIYNwVG/GxBxHML 7T6Z63SbodPg== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="170563656" X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="170563656" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 06:40:07 -0800 IronPort-SDR: Pq8V7q6rM2uU+JP3glHQjL4C3bJgpyP//rleNfSJVFUkh9uhxSSg9nl3JIE2jPSZvo7/8XCTec CU5C+bwn4hvg== X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="361703509" 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 06:40:04 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lC1WD-005U7q-H3; Tue, 16 Feb 2021 16:40:01 +0200 Date: Tue, 16 Feb 2021 16:40:01 +0200 From: Andy Shevchenko To: Dejin Zheng Cc: corbet@lwn.net, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, rric@kernel.org, bhelgaas@google.com, wsa@kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, kw@linux.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] PCI: Introduce pcim_alloc_irq_vectors() Message-ID: References: <20210216141810.747678-1-zhengdejin5@gmail.com> <20210216141810.747678-2-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210216141810.747678-2-zhengdejin5@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 10:18:07PM +0800, Dejin Zheng wrote: > Introduce pcim_alloc_irq_vectors(), a device-managed version of > pci_alloc_irq_vectors(). Introducing this function can simplify > the error handling path in many drivers. > - if (dev->msi_enabled) > - pci_disable_msi(dev); > - if (dev->msix_enabled) > - pci_disable_msix(dev); > + pci_free_irq_vectors(dev); This change deserves a line in the commit message. -- With Best Regards, Andy Shevchenko