Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8075634pxb; Fri, 19 Feb 2021 06:53:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsW2L9sQq6GkmIxrhdhigLVQcuq6qNnYnPU8RH8C6zvCoXBffY1nS4eYqxjmdJofmPG5ZW X-Received: by 2002:a05:6402:2052:: with SMTP id bc18mr3967908edb.74.1613746389101; Fri, 19 Feb 2021 06:53:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613746389; cv=none; d=google.com; s=arc-20160816; b=Mr5ShyJsShXXRe8+zxV6GlluhhUihDKR/VSos+JDSgANj/Yo+xkJDKZJXQAJMX3PfG LBNIN/vd7MMpWMlJjrezAlg7fyAyOyXNpZuzQTHLv50AiIGzRvd2d0cLCWBLCxiTwgqW PT/c91qZ0eNhT+u74mVEG/ATKkqHjBJEJ0BnaPlt9BS3GC71OgoP6RnT1VDr0ognlILq hXX6qHnLSzqyxymHVy51oESWGW4IMIhbXv/Z6SsnlsxcZCoS/pKHG3PhhuxPaGrjI2iS +sVP2fYS7LrIPmjZQQb3Wc+pMJZuiIiep/tD0bs7ThAC3Te5zdI+2jDs0Or/QyOvvtrk 73zg== 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=0R8D5A/R25e6bizwNcxPo23K0OlDwn3CWbeZ17hwE/0=; b=YQOHtKSuIQFK2gStEWPSLN8mw/wUIDnEDqcbea+FHY6CAZXDK6irefP7A4LN2asTm8 fULTh8HfEhqg/mfASc19TKCn0VTYxGWz+wG7HD+TZ90kdOMmpJIrUR9ASY4Rnt6gJndY AIXjztxUy2VRz2gLVWuyCRRZiMmMoW6ID7pDT4xB7RVm+LrDeITvvc4166U0YM780MyQ PlDbtqwI3q4fK/vFLBHaI/QyjlKINhxe0Vk+NyXXO5CVlejRsBBkNObF2TtKe4PvI9j0 i8TTT9E21RihIJsUAGXw6ZXEWKiEuH5F7FcDbWCZKHyNBH1fEI7j033bWc1gJWJT6cxw VVaQ== 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 j16si5884463ejm.573.2021.02.19.06.52.46; Fri, 19 Feb 2021 06:53:09 -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 S229876AbhBSOvt (ORCPT + 99 others); Fri, 19 Feb 2021 09:51:49 -0500 Received: from mga04.intel.com ([192.55.52.120]:31939 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhBSOuy (ORCPT ); Fri, 19 Feb 2021 09:50:54 -0500 IronPort-SDR: +4RF03nIyHPZi7UhDcYVMIbSKvTEB1wYhL2NAhGScX5KBXK6Wz0XFJ+6z1reYsZsYxCG3dr0bz BtnlyA8UglYA== X-IronPort-AV: E=McAfee;i="6000,8403,9899"; a="181303765" X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="181303765" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 06:49:03 -0800 IronPort-SDR: Uq9BrER0cYtgb3PBefjRQKbz28uOWaMWnMGEDOB/EltjgHv47bgZ+ybyeMZfqASp/GoPK6lv8A uWJy/okfay3w== X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="428864916" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 06:48:59 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lD75V-006EgV-5R; Fri, 19 Feb 2021 16:48:57 +0200 Date: Fri, 19 Feb 2021 16:48:57 +0200 From: Andy Shevchenko To: Robert Richter Cc: Dejin Zheng , corbet@lwn.net, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, bhelgaas@google.com, 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 v4 1/4] PCI: Introduce pcim_alloc_irq_vectors() Message-ID: References: <20210218150458.798347-1-zhengdejin5@gmail.com> <20210218150458.798347-2-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Fri, Feb 19, 2021 at 03:40:05PM +0100, Robert Richter wrote: > On 18.02.21 23:04:55, 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. > > > > And use pci_free_irq_vectors() to replace some code in pcim_release(), > > they are equivalent, and no functional change. It is more explicit > > that pcim_alloc_irq_vectors() is a device-managed function. ... > If it is just about having a pcim-* counterpart why not just an inline > function like the one below. It's a good suggestion, thanks! Still we need to amend pcim_release() to explicitly show that we call pci_free_irq_vectors(). -- With Best Regards, Andy Shevchenko