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 3B249C433E0 for ; Fri, 19 Feb 2021 14:52:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 03F2164EB2 for ; Fri, 19 Feb 2021 14:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbhBSOv5 (ORCPT ); Fri, 19 Feb 2021 09:51:57 -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