Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7428621pxb; Thu, 18 Feb 2021 09:48:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyILKTwJKxYpoOX6M8RRlaU9ogkyOJeCjRfHHitYLAbvqMBcqTSi/+EHBV+Oj56aSKIqSBG X-Received: by 2002:a17:906:2acf:: with SMTP id m15mr5059848eje.118.1613670485073; Thu, 18 Feb 2021 09:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613670485; cv=none; d=google.com; s=arc-20160816; b=J3HwHXAaKaqg/E3tHBl2Ie4OnyUHbcE3gZX9JqoldIWZA9Z40c2Pp0dsi6e9VxWbB2 pVCpSZNWgB5SOA7qJFmHYVo6lnYTLWrXerFVIrWBwaw5vA38GvCpIB8VrAjNXcNptw2e JIeNWzux+UOCPKiVL7VlWchl2yKARoy6AyHUSd8rjPW/g6Gti3ZjgEc90gjkUTb/o5b9 zQdzF9tRx0C185gjkODT/Inq9S61S2h2BSoK/n7NwmAVQf6TWIxIQHN39UaW+Em6NWQT K3kfnH7kSFvsKEz6LHPJ6JOOSu8qVbYlIeg0L1LnPybJp3qxLn3B2OlKspRaA50UDnnR oAag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Q6JzUvbHZRHZd4ZQ75NBM4QAoNuZQMHHQcSNWn9QvA4=; b=T2h9xvOwhCip2gNQnJOMkxgZ6uYiV4CyNJs533T3t2GHurjuscnxyLlwBgom5EE8fs NuWeP93/D8VPRqT+mKVKQFnotiPD1mIVfvZoogXq3isQuaSPAgxanjZh7ZX26yFWiL21 gXdhuCMS5vz3cofvEWuITHpH5zbOoDhzEVLUVL9jBi248AjEUbRC6o6tgT4qL3HRODE4 zzo/S8KcGxi3oiU3y9idIc5Sf/kzLVYiCo7fDKfk1/ouv3cZODCOvb6D1fKonx0dF+2i /QG7eVoDX5oOZ76UA2ygIbOoxbIOtsObO91miS1/LPozsRcXznOsPtLn0t0lSKNJCwNx 41LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kqdz24IE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si2951592ejl.334.2021.02.18.09.47.40; Thu, 18 Feb 2021 09:48: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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kqdz24IE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbhBRRqn (ORCPT + 99 others); Thu, 18 Feb 2021 12:46:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbhBRPFq (ORCPT ); Thu, 18 Feb 2021 10:05:46 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6F98C06178A; Thu, 18 Feb 2021 07:05:05 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id k13so1444440pfh.13; Thu, 18 Feb 2021 07:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q6JzUvbHZRHZd4ZQ75NBM4QAoNuZQMHHQcSNWn9QvA4=; b=kqdz24IEELGBD6Xwjwkfk8x2Kth0atGo/+z5qaF4+NPcwPkDl8x9AzNCOwdtoUWSP6 fC/xvJH7grhIB4PcPhO6dhualq4Hts37AS9lAsNQ93hzcdt/LTLHjf1nhcQ3EdYR0O2r wzTGpFp7fpH+oWHn5XgX/lQfwVEm4MbBA8Ym8p3KONLnhN6ZoiVj8OVX1jzl1LfXjJek eW7QPkW+TAZUivhY09BerzQaE7j6JaaOf/LwCX9VVFBXl6EQ1iCEnvuLyMxzAlrTEWXS 772MaL3ECEaCxIRZ8jv5tRrbhkn9OByODs9+mWWbrhp4bZtUWNWO/hFOmu4nNrTNP838 DM1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q6JzUvbHZRHZd4ZQ75NBM4QAoNuZQMHHQcSNWn9QvA4=; b=MT4tlFqpPOJgtwDvQYx36NDD07x7lYlVuNFEEjZqREP/7tAETXhRdhtC8ftyukjQS7 3L32h4ovIyFxsCjBnI+syWV8rGC8u9I99jcyAfU+W+J7gLexOB/ve6tE7ZOYbFZC0Naa E8OEn6r4hvUraURKV8NsE5cw7vcae7EeC75S0eAJpQ+DS1j+FERymcTLLvf3vOg0Pg0n nhbCVkc9dcyfQ/ayc1k+kqkxaVO3CsAxus7yKRAdmfSUzEjqqF/pWGr1HXJ4sUDAqVBY ddPdHLM3QpsxOf6wS8ccsLu2aT41YOCgN9FfeL4KrCzIy4xza9eATgUTs4Q3poVYVKIS jWWw== X-Gm-Message-State: AOAM5318bttiolT2qXTzAUbtKPKyaZ8A+8gHRwHw1d9fF6TLMNCu1We7 MbrASKPl3Bf3DyKdP/aRwDI= X-Received: by 2002:a63:1648:: with SMTP id 8mr4426357pgw.392.1613660705220; Thu, 18 Feb 2021 07:05:05 -0800 (PST) Received: from localhost (185.212.56.4.16clouds.com. [185.212.56.4]) by smtp.gmail.com with ESMTPSA id r23sm6396270pgl.42.2021.02.18.07.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 07:05:04 -0800 (PST) From: Dejin Zheng To: corbet@lwn.net, jarkko.nikula@linux.intel.com, andriy.shevchenko@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 Cc: linux-kernel@vger.kernel.org, Dejin Zheng Subject: [PATCH v4 0/4] Introduce pcim_alloc_irq_vectors() Date: Thu, 18 Feb 2021 23:04:54 +0800 Message-Id: <20210218150458.798347-1-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). Changelog --------- 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 the correct name of device-managed function i2c: thunderx: Use the correct name of device-managed function .../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 | 33 ++++++++++++++++--- include/linux/pci.h | 3 ++ 5 files changed, 38 insertions(+), 16 deletions(-) -- 2.25.0