From patchwork Thu Aug 22 13:47:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13773549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2ECE1C52D7C for ; Thu, 22 Aug 2024 13:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kI8i5GY2jMRlAmQS1bSu+iftmIP5RtQVe31XoOUBz1Q=; b=kUKnqC6a0tbdEkcNnjcJ1FiVzt r64Iy1lPKVitGaoNRXIBPDiu7ZsorXCW7KfDLgdkscBNH9JAAgC/yzJDdw747irJG/mk5Tt5mw8o+ LUZq3+yM31MZ0Sv2qWqQNz48fKgZ1+dWHkIzO1C82eU6GqiOiGRzbe8Kds3xxOPNP4J3EDJFBuEq6 T0MJ4HU4fjKdmRULYC5A1TUrvMmb0yPzULVGPMZ0/y5FG2brC0JQFB/A9PO1eCHZEainW/U7XZa/k CwKQ1fvkkd762btrBvVK0XkdQZ+fQe/+9Tp2G/93qGFxBwD5CQLRl5J50DryWup0hF2My42UzLYZW pW8cz8cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8DQ-0000000D1pc-3Lo0; Thu, 22 Aug 2024 13:51:04 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8AZ-0000000D0hn-337b for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 13:48:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724334484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kI8i5GY2jMRlAmQS1bSu+iftmIP5RtQVe31XoOUBz1Q=; b=dcSHgESwIP2k7F/+i+JLgaaeHRU5uf0LYqItOYt+0J0NNE3SEV2oxBgF55Y+njyP092zoc AEpfnCh8XX7zV19+NMNyVWWsRqip54PuQXz+Z7bcaatwm+26pS7TjXxoIll/XgpvHK43Pa uDa9dMbvZlicDgUEncCDkHjbcRlucMQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-38-_J3OqFJuNke5_-FANkC0cQ-1; Thu, 22 Aug 2024 09:48:03 -0400 X-MC-Unique: _J3OqFJuNke5_-FANkC0cQ-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3719ce5627eso446905f8f.1 for ; Thu, 22 Aug 2024 06:48:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724334481; x=1724939281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kI8i5GY2jMRlAmQS1bSu+iftmIP5RtQVe31XoOUBz1Q=; b=pG3p45Roj0Sq59yGzFncDGt4xafyH1iuKWpFidJsYwczgmZO0HuJ3lxqPyGwdQ7+Nc ngXn7c0cRjNxoS2WDscgEhEkh4zgKcWo/PF+0yGe5CT5tL2HDpqnhB6ldJKUd6GEj9R/ M6YTA6Fdcj9+3wqXO0M6sqUCEATvZSiLCvgY1A9T/xGXV+XPV/5xNUmyqGvIpRmf/zSy FSPgfpuZ/5ULOnJm61Q+EQsX881fsFZJ+t9hNLFYB0B3ZP2dpQpLjmlDR5bnSoV7mFjx 1OoXNt5PVzz/51pOLz/k3vs4xnQKSRVZQhJAyIuJvN38mlYO11TV8RPoe8EZ/ORqPx5u /8gA== X-Forwarded-Encrypted: i=1; AJvYcCWhC07VhbHPsunybywRxmJ+ezaFzzH/2k+io3wPWt0oZTBTgfLg14K9BdlYNSNigIneRCaxC2O5kkcr3qJhpqbi@lists.infradead.org X-Gm-Message-State: AOJu0YxJVgwYZ050iqvkaoxkMJQYGnvADiuVtTXCBQvHvZtzzIBoVkzt zIC+PY3TZWl/1YDBbTSWi3Tc9o7i/JZPL5h6ZGwoUECiPU6N2VkgeZ+o+ax8H4eLDUlIxz/oRjO 9KMcW7dcXdhC2HZcSX4wz5a86kC4V6WM/0vOW/56odgHONbifJk4BGtz4cxDzKEbBYbD0nHOX X-Received: by 2002:a5d:68cd:0:b0:36b:c126:fe6d with SMTP id ffacd0b85a97d-37308c16966mr1223176f8f.24.1724334481149; Thu, 22 Aug 2024 06:48:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKCJk3UamU3gY39Dgnd4livDPv6g+NgCSNYxILlIqQhW519NZZIsqmP8GHU9qtEnK9x6mFHQ== X-Received: by 2002:a5d:68cd:0:b0:36b:c126:fe6d with SMTP id ffacd0b85a97d-37308c16966mr1223157f8f.24.1724334480675; Thu, 22 Aug 2024 06:48:00 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ac5162322sm25057215e9.24.2024.08.22.06.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 06:48:00 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Jens Axboe , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Alvaro Karsz , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Richard Cochran , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Philipp Stanner , Damien Le Moal , Hannes Reinecke , Chaitanya Kulkarni Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fpga@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev Subject: [PATCH v3 2/9] fpga/dfl-pci.c: Replace deprecated PCI functions Date: Thu, 22 Aug 2024 15:47:34 +0200 Message-ID: <20240822134744.44919-3-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240822134744.44919-1-pstanner@redhat.com> References: <20240822134744.44919-1-pstanner@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_064807_908910_E2D37009 X-CRM114-Status: GOOD ( 15.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Port dfl-pci.c to the successor, pcim_iomap_region(). Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region(). Signed-off-by: Philipp Stanner Acked-by: Xu Yilun --- drivers/fpga/dfl-pci.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c index 80cac3a5f976..602807d6afcc 100644 --- a/drivers/fpga/dfl-pci.c +++ b/drivers/fpga/dfl-pci.c @@ -39,14 +39,6 @@ struct cci_drvdata { struct dfl_fpga_cdev *cdev; /* container device */ }; -static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev) -{ - if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME)) - return NULL; - - return pcim_iomap_table(pcidev)[0]; -} - static int cci_pci_alloc_irq(struct pci_dev *pcidev) { int ret, nvec = pci_msix_vec_count(pcidev); @@ -235,9 +227,9 @@ static int find_dfls_by_default(struct pci_dev *pcidev, u64 v; /* start to find Device Feature List from Bar 0 */ - base = cci_pci_ioremap_bar0(pcidev); - if (!base) - return -ENOMEM; + base = pcim_iomap_region(pcidev, 0, DRV_NAME); + if (IS_ERR(base)) + return PTR_ERR(base); /* * PF device has FME and Ports/AFUs, and VF device only has one @@ -296,7 +288,7 @@ static int find_dfls_by_default(struct pci_dev *pcidev, } /* release I/O mappings for next step enumeration */ - pcim_iounmap_regions(pcidev, BIT(0)); + pcim_iounmap_region(pcidev, 0); return ret; }