Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp812704pxy; Wed, 21 Apr 2021 16:04:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5vr0iNJf46s83deQZh/U0oWiI81CNDKNO3upLDw7rDmJ5e5je2WDeZPIIWgDGY8lGZL2r X-Received: by 2002:a05:6a00:88a:b029:261:6d37:dac6 with SMTP id q10-20020a056a00088ab02902616d37dac6mr487212pfj.18.1619046287247; Wed, 21 Apr 2021 16:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619046287; cv=none; d=google.com; s=arc-20160816; b=cHCzqwMlN1zeSOcb2WuxIbticmrE9YbsQjTKLRa2Cw4UuAibksa2vBoCwiRGAKJj0O 5WgDuubTb7ePJY6/lhBaPA7bzrT8vc+g9GEpHxKPjFpxx49DM5hY92OTjC5j7hhXATOD 6SGoaYSilwwzW+zMaVxNyRgBXzc1bdUX9wCRD1sK+S9WAC9N0U2KL06n1XM1+Yj0AhgH RjNtPO1Ma5c0Es585RV9sVa6PFC6PTDq4ZwX0vpRx2j5TsSOu/5fG6CgsG06kijJ1iTX Aggzenkwvr0E3wQ6gdBN5xUGInA/7WQ2Kb/qVFUpv0zPVsbV7FNBBhERJHXaS+/pSaHi TxTQ== 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=JQGfsA8T+upU4aOfJV76HuCfxfaKpfFc2X6zwauwF88=; b=hvVAVylg4zugdmGuqjsjuMN/fGG6I3d+XL1DkE/ayx/en+0o2YPUyjMAG0Gkg2Nvip gjemouqSGEqrS0L+BJvZ0hgCDgW2hUPGNByBeHQnLPflJCIth4Dx/BRCi1wcJcBd3n4X lZCmG3XcD4keXI9xuAOnCoYxVpiFZLEZvbM7Yx682Hs7LG1hAn/nU1cTTSgD7AO94B3v 3v/55iJ5VKuOP/nVuYl5MXLC74Dcz3IAq20ZF+8FpN1aaNDgekRBUqpROpGlcKm+tFGB apDp4N9q8rqRm9Xj2fLgv6q/qj0TKwW564GLMmMRonVqQXMtddpOrMgDh7elQbQpL3SC ETEQ== 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 w22si1061947pll.206.2021.04.21.16.04.33; Wed, 21 Apr 2021 16:04:47 -0700 (PDT) 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 S243410AbhDUPYt (ORCPT + 99 others); Wed, 21 Apr 2021 11:24:49 -0400 Received: from mga14.intel.com ([192.55.52.115]:35687 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244010AbhDUPYC (ORCPT ); Wed, 21 Apr 2021 11:24:02 -0400 IronPort-SDR: cdTdzFgRViFcDv8gRKs8iUF7CgxnaoVW1zrXGcJafDiGZdZeCCDwCk8AyYZHbr6cpteVfwUiEN kJU3XFV7cHEw== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="195273900" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="195273900" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 08:23:29 -0700 IronPort-SDR: goI6wrw2Cay5It9IfcIPGyGV379vnJrjvX3s1ZHB8nSCryD3TSo2CIT4KGJ7ZpNmtZstU7CY7x 4ha8JHMX5UqQ== X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="455380891" 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; 21 Apr 2021 08:23:26 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lZEhH-0064QA-K1; Wed, 21 Apr 2021 18:23:23 +0300 Date: Wed, 21 Apr 2021 18:23:23 +0300 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, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/4] Introduce pcim_alloc_irq_vectors() Message-ID: References: <20210226155056.1068534-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210226155056.1068534-1-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 Fri, Feb 26, 2021 at 11:50:52PM +0800, Dejin Zheng wrote: > Introduce pcim_alloc_irq_vectors(), a device-managed version of > pci_alloc_irq_vectors(), In some i2c drivers, If pcim_enable_device() > has been called before, then pci_alloc_irq_vectors() is actually a > device-managed function. It is used as a device-managed function, So > replace it with pcim_alloc_irq_vectors(). Bjorn, I don't see this anywhere, except mailing list. Neither your opinion. What is the plan? > Changelog > --------- > v4 -> v5: > - Remove the check of enable device in pcim_alloc_irq_vectors() > and make it as a static line function. > - Modify the subject name in patch 3 and patch 4. > v3 -> v4: > - add some commit comments for patch 3 > v2 -> v3: > - Add some commit comments for replace some codes in > pcim_release() by pci_free_irq_vectors(). > - Simplify the error handling path in i2c designware > driver. > v1 -> v2: > - Use pci_free_irq_vectors() to replace some code in > pcim_release(). > - Modify some commit messages. > > Dejin Zheng (4): > PCI: Introduce pcim_alloc_irq_vectors() > Documentation: devres: Add pcim_alloc_irq_vectors() > i2c: designware: Use pcim_alloc_irq_vectors() to allocate IRQ vectors > i2c: thunderx: Use pcim_alloc_irq_vectors() to allocate IRQ vectors > > .../driver-api/driver-model/devres.rst | 1 + > drivers/i2c/busses/i2c-designware-pcidrv.c | 15 ++++-------- > drivers/i2c/busses/i2c-thunderx-pcidrv.c | 2 +- > drivers/pci/pci.c | 5 +--- > include/linux/pci.h | 24 +++++++++++++++++++ > 5 files changed, 31 insertions(+), 16 deletions(-) > > -- > 2.25.0 > -- With Best Regards, Andy Shevchenko