Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1539284pxb; Thu, 4 Mar 2021 14:10:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmJm8Li6/R+MCg+rHErm4Ie2tLm0fDv7exssjAfMbJbGGGtgbOdrR/5KIreaTrLQaRyfx6 X-Received: by 2002:a17:907:7651:: with SMTP id kj17mr6610115ejc.127.1614895803977; Thu, 04 Mar 2021 14:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614895803; cv=none; d=google.com; s=arc-20160816; b=LJJFR81uf7dEoULP+RN+9I7Pz6DpYq2PGaaWsMjZ5o0f+kST9yvQuk7BJ5X5mCFE/B mt5VOG5W/Fj6tATXebEo9F11ANiP9e2MfzgWLSLyHovzpUaXXxgzgoa2QyaRoZkqaYY5 nSTZZS/WFKN2m27bz03rEjr9yMXTESR4F738ttqMoEdUxjg+efTCUFNw8QbntT7fzlV8 gCIwXnq3/9vbJoY4zBpehNqdLHzn8yEP3wPQ/QsfVdkuXF7SJmQ6MZM1vQ2sJv5rE3BC 6ySBspzbSFUVjKPiMUTM0ukoMHIh3skNTaYBWdIwbUGNAKZ7Mrfc6atFYkrgCvDiEevA zWRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=qEgIy8KNPHLvxZ04li0YcLNKtR8dh76Vcr3UxAjui0I=; b=oF96oJx+b/xI+jT9SNbiG9YvU/kCic9L+rNxEj4y/cUfRicvHZAiY8OKqRWrYiJGU8 /E56VcDuUj0fF3gapa8gGxD77zgBn/P7E+uLVPWv0eNocsz11aLpcxzZwWLnPMA5dYyv 5fqyOJ/8jcy9k8TE4xSqIihnaqaEeF3Pwpq2/09tjzcGyf3pnzz5QaaFeG9JWQH+6efh Ij0aiiyatLE6JTSdxV9JGmhq+aJcHIkpz1O+Wb4xqiR/t/MHeMSdMBYavrWwmh8EeeRp PFkjw28gKRSnc0aEh36o/eLDo/cmqsctOhKBS97mtBxebp0S2pUrp2cEwkij/AzHYBtV 6sdA== 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 p14si243774eji.719.2021.03.04.14.09.39; Thu, 04 Mar 2021 14:10:03 -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 S1383751AbhCCPei (ORCPT + 99 others); Wed, 3 Mar 2021 10:34:38 -0500 Received: from mga17.intel.com ([192.55.52.151]:50123 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356507AbhCCKrh (ORCPT ); Wed, 3 Mar 2021 05:47:37 -0500 IronPort-SDR: oqeQfvXOFMO5qTf8EOHr0kEP7hqjGabRftgsQH72rLLDZ5LF+k9Nt+e1xGZibPyTcX4Mp5KFLe hX/N4AUH6Mdg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="167049145" X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="167049145" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 01:27:44 -0800 IronPort-SDR: JWQ4GYZNL/PGnPAfZQx9BLJ0pPS9sEg+0r0Lw8XZVMBpL4rUlyZxCMchHOm9zx3o232FIhaZpl EE9xmUUOhPRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="506723803" Received: from mylly.fi.intel.com (HELO [10.237.72.57]) ([10.237.72.57]) by fmsmga001.fm.intel.com with ESMTP; 03 Mar 2021 01:27:41 -0800 Subject: Re: [PATCH v5 3/4] i2c: designware: Use pcim_alloc_irq_vectors() to allocate IRQ vectors To: Dejin Zheng , corbet@lwn.net, 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 References: <20210226155056.1068534-1-zhengdejin5@gmail.com> <20210226155056.1068534-4-zhengdejin5@gmail.com> From: Jarkko Nikula Message-ID: <95c9e172-222f-32b7-1176-a3aa4b404f0a@linux.intel.com> Date: Wed, 3 Mar 2021 11:27:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210226155056.1068534-4-zhengdejin5@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/26/21 5:50 PM, Dejin Zheng wrote: > The pcim_alloc_irq_vectors() function, an explicit device-managed version > of pci_alloc_irq_vectors(). If pcim_enable_device() has been called > before, then pci_alloc_irq_vectors() is actually a device-managed > function. It is used here as a device-managed function, So replace it > with pcim_alloc_irq_vectors(). At the same time, Remove the > pci_free_irq_vectors() function to simplify the error handling path. > the freeing resources will take automatically when device is gone. > > Acked-by: Andy Shevchenko > Signed-off-by: Dejin Zheng > --- Acked-by: Jarkko Nikula