Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8083769pxb; Fri, 19 Feb 2021 07:04:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO1gnjOKj/zXC6iZoB56kef572wLhP1zrtmwdGRsx+tMxE4KN2gLgmsoK9fDqBcfun01PZ X-Received: by 2002:a17:906:28d6:: with SMTP id p22mr9238818ejd.365.1613747081523; Fri, 19 Feb 2021 07:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613747081; cv=none; d=google.com; s=arc-20160816; b=TX07axHoFykvFaip/hVFR63nc2Dik2TG6Fpv63q/DIRfo3mluubmte3vTJmozHw/nx 59zxFr0ETHj90dbgJ4mKRTR525gohj6zc0DVgvKSbiRjuoNIgZ+yJYdgyEPRjV5nRK7C E8/kIgCwPuJf3cVHuaEk3FKqEpnh0djhg4pzbJc0MTBstQUZOAltTSyyqMSHnOa0vuSG NKKOjjgY04XflJszlJcAl8RyoHH+W9ECsTB5epvYAD3liqmKe5Tjub0Z8c3xpH4FQUTm 9JsvhoWbDn+G5aYvmDhxb2LoEYwQWjdHilCwXq7LaiciaprEKk84dj7uncScW5aOhWm+ PBvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6POvWjkI82NxRm/78PcodYoip0wbCf0cm0pUTUcBcoo=; b=DySCTKLJDEfu9h+JET739VNCpv3Rl39Thk+SJmsCX1wjUHp3aC8gDw5tpnpMxtgRYw 07QpzGU4dcpY+vsrsWBmgAnBWoJ4zgcp+WiQKFgxkVxWAXbpC4roLDay0ptttNnOf3ie kE28in4V/w2R3AeBjLo+UXIN3TTBFYrUkajtThqYU/QScUZgNIgwDQyM4BDgB32rx5dU K/ooIwr75scI4sAx5CdShsPKfhWs60v06y5RmK2tICnK7Q8PyFuWIwDFRB2TaWWPeXLs BlMgqQQO0E39ZG22JIypD+FgD/9L1bf8jlQkWsU4MRJoW87IfscejsqT8mPASaGC372d mbzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/gVip9/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs7si7264165ejc.745.2021.02.19.07.03.57; Fri, 19 Feb 2021 07:04:41 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/gVip9/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbhBSPCa (ORCPT + 99 others); Fri, 19 Feb 2021 10:02:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:37972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbhBSPCY (ORCPT ); Fri, 19 Feb 2021 10:02:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9FE9E64EC7; Fri, 19 Feb 2021 15:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613746901; bh=2dvd+U3L8fNFlkHRFUOynnP8Ro2etvNKVTOpnZNGerQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g/gVip9/5HTsH6FBcHyt3lUBDaL6oQTVI0vNs+wdT7iUbqS3M2PUJWlKpmdcrZA+e NRKr2+6N/X/+ty8ki0AGPwKyo0VECTibT0+PgKptGjwzB8tl6QuEZXUo1EHIp5jzun z14cW8rsBbNtOexXUV8B+jdC5BM1S4m2fz/LfFDbUgvZCEBi2J+A5uy3JgwZrnUdfa 5vjDabcZ65J0UWCh1udNMPJxUUvGG0Er1W1pKRtbUHSKkyEa7E1hop0OfAgrpeKoaF PINe++5UaPU9PSdws8j4rCTq2v5xf4K/HtpvjsD2KLPtZrwAu6m9oBWxBlAWvZMmQz 0rpPHbpbAWq3A== Date: Fri, 19 Feb 2021 16:01:35 +0100 From: Robert Richter To: Andy Shevchenko 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.02.21 16:48:57, Andy Shevchenko wrote: > 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(). Fair enough. Thanks, -Robert