Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1685353rdb; Thu, 7 Dec 2023 06:18:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGi8XWsEmBod3aFP/RH8Z2dU8Jc9j+M+Q5nWVqU54/pACm2Cv2ygxAgCLOkxqXvd+xoASR7 X-Received: by 2002:a05:6a20:c192:b0:18f:97c:977e with SMTP id bg18-20020a056a20c19200b0018f097c977emr2934136pzb.102.1701958717696; Thu, 07 Dec 2023 06:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958717; cv=none; d=google.com; s=arc-20160816; b=s5nkO1jcvyXHntosLA+B9sw2CqDYfPvqH6V5fiKDhgG3NyFEb9GW2b4hAdbSYPyUqL L3CFvOm04RYSPUjsZDRDrjk18saEPoqAmcmLWOA+Yja2D1bRJXZV/6ZOIpJdEGRA6xzG VaF4iufbpmCn6h2PhSZFqaAz7qg14dsguNUwhM5l9HrXBGmaQXp9r3IXHUVIaPSCrpEZ arLyFXzUW26d40g1Qf1oBPfr1wOgZYU2gQ0yUWDJg7dDWPJMk18Xnh4QtraMNat1NwaZ 47x6wleLo9M4xuiwDXa1ZfrI2T1gp/rTB8xC4qMrS6syvvDVdpcNVMro3cixlUF1Krfw wshw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RNHpISS4j+4g6jBoQvNBOMR/EveEmkYRZ9tnwctn/N4=; fh=2EyuYZuFv7pvbWODgXyYvSVo1Jt/nOD9U4n59BuOM5Q=; b=P+40GmJQ0g6SCnKghWR/nAtfsb4WJcE/II3YK+kf8eukX7l0pZ2IRJ+km3cDCzIBQ8 KuHqdWG69cXcF3HOwO26E8UzGz0/iKR9T0OPnm5a0RQuLgWc7M7Lah5uQpAhSTc8r85X /AZSKbdxxt54MU/BKBzWN/okFkStZGGe7CwPX566+Bc4W3PCXCuHeGksPdiPAtz1p/cz +wI4kddzH00oA5MjqRfUXKP5FEk6bWgceJhQe/wUTxg5L4rkYz4qTNvRqBXHsOcgUeUh Aa9sur1qPCHSATZ5Dkra8+KP5jL0ulpUFCXc8XLNVrHCid/dHzPLDH/OEfQo3hzO89MR +xYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QMIlw2L9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l68-20020a632547000000b005c66c22569fsi1314981pgl.175.2023.12.07.06.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QMIlw2L9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 67F86828FAD4; Thu, 7 Dec 2023 06:17:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443180AbjLGORH (ORCPT + 99 others); Thu, 7 Dec 2023 09:17:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443146AbjLGORC (ORCPT ); Thu, 7 Dec 2023 09:17:02 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 557A810E4; Thu, 7 Dec 2023 06:17:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958629; x=1733494629; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EOlUZ01nLfo2uCgoR75r9++zowSZMH9o/jg9adFUKGM=; b=QMIlw2L9YfJ3CQDxFomssc266o6oudn2zc7ez6nYpS2DD3/XnrWCFOKY U7gw4hAUBPCyvflsUvyx7t6flGl+C+3BaPgfkKKkja7fZ3B6qDK/ueL6t au9djV7kOG5W42VYV4yVgDKMI7RzHfI7lOWYqEtu/S3KMFd2jD/xF3jH3 gj0V1bcWSLTFq4q+SaEo7kM8DWywtGmMjpYKyOyOwfePRCo6SvupbwQaL lAhHFKK4wWZ1yC/QeJovZm1jy5/PIax+3vi0yTdtUubNd3nt8k9BOGIv8 38ruKI97h+1OwGJHK4p7V3ktt56sZONeEvZCwIOTxaGYDwZg6hmD7mkpW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726075" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726075" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="862490630" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="862490630" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 07 Dec 2023 06:17:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 99C7565B; Thu, 7 Dec 2023 16:17:02 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 03/24] i2c: designware: Let PCI core to take care about interrupt vectors Date: Thu, 7 Dec 2023 16:13:43 +0200 Message-ID: <20231207141653.2785124-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:17:57 -0800 (PST) PCI core, after pcim_enable_device(), takes care about the allocated IRQ vectors, no need to do it explicitly and break the cleaning up order. Reviewed-by: Andi Shyti Tested-by: Serge Semin Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231120144641.1660574-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-pcidrv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 61d7a27aa070..e67956845c19 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -295,10 +295,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, if (controller->setup) { r = controller->setup(pdev, controller); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } } i2c_dw_adjust_bus_speed(dev); @@ -307,10 +305,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, i2c_dw_acpi_configure(&pdev->dev); r = i2c_dw_validate_speed(dev); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } i2c_dw_configure(dev); @@ -330,10 +326,8 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, adap->nr = controller->bus_num; r = i2c_dw_probe(dev); - if (r) { - pci_free_irq_vectors(pdev); + if (r) return r; - } if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) { dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node); @@ -359,8 +353,6 @@ static void i2c_dw_pci_remove(struct pci_dev *pdev) pm_runtime_get_noresume(&pdev->dev); i2c_del_adapter(&dev->adapter); - devm_free_irq(&pdev->dev, dev->irq, dev); - pci_free_irq_vectors(pdev); } static const struct pci_device_id i2_designware_pci_ids[] = { -- 2.43.0.rc1.1.gbec44491f096