From patchwork Wed Aug 21 07:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13770943 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 A9915C52D7C for ; Wed, 21 Aug 2024 07:21:24 +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=tC041gyCjeykzm80lE0q63CM17fX2IeQcUJmRWOoBEs=; b=taLsVkDTvbB+AXD7irW2HrpSx+ WdAlqEyUFKt55TOvBUVYaLd1snXL/TkGXx6UoykeZZ+Zj1yeE1jpUvcfuJdRCnbtuXzlSCU01ozDD vA/AWQdIhuqcasHboLYnpECDcXCOu2OnYR+w7OHDGKe/a4rlfNXrkaG0ZLIhGGhbvzt8Yr+OKCQb0 2Cv1Mz7SaHeq04CxxmN1oW23KEX/gM5U0aYafBzSc8FW95oXpekDRi8gNBjxQPpmomI/beXYLm+Ug +4dG5W7NI7+500ovkGSAdsz9P0inEzFz7h0LGLsHjZXLE50pupU+8cbKT40hHFDYUzvyVOnt6jT+Y Cj6Rbhbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgfec-00000007sQW-0IM3; Wed, 21 Aug 2024 07:21:14 +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 1sgfcg-00000007rfF-244f for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 07:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724224753; 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=tC041gyCjeykzm80lE0q63CM17fX2IeQcUJmRWOoBEs=; b=dlyuP+U/4lKHOGUC1kRwpRlnMpi/iI1EIrsoUllpVuaOF983wHAjCEGMQ9uqFaC5u5s4rK Txd03qnhfaCg2rNAnbRq4jMyFQ19VcrWGtiA+RRZP0YYppJFIM7fN5xcPvGIQ6mI3mFLOM HUlpWyarehbwwGHB3tCP/ntY8wMjYBs= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-572-N5s9dpz8NPe7VhoBAIGuLg-1; Wed, 21 Aug 2024 03:19:10 -0400 X-MC-Unique: N5s9dpz8NPe7VhoBAIGuLg-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7a1ddb0cf87so666372685a.0 for ; Wed, 21 Aug 2024 00:19:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724224750; x=1724829550; 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=tC041gyCjeykzm80lE0q63CM17fX2IeQcUJmRWOoBEs=; b=aw1VfKuVIiWtKN7DHONbxYWjLFSCaLVOifZwYbLSrklVaZhTa5G1qNjQPGGbPSA4wb 0bLTe7l+8pWHKRflKJK5bsOa+QBWeogVYkeIap1rbAQW8zKh7aCISmpeYoF+X3ebZgd0 Wb7BjqGY2Bs3FRwVgVPKCx/fiJZaiwVDi3oFppedNpEuLpZZsS6WT+uwgGf4+AkxLPpt 3W9Z21CzaRZQ9etu4JIZdOXijnnL0BOTZmz/KxjA99PzaUyCK0vdQor63fQUgNAewIti w1AW6D585mbZaXPbVU6VDtod6X+cATKQTUdvIKGcRjRkX5bwsLgJvSl95SqqZIdACd/C KNDQ== X-Forwarded-Encrypted: i=1; AJvYcCV3Rxb6QLvyxphVn/4rayfkKBToFDTLUrHnUPvW6iA/t4ZhBGoRs2AJF3gUCFw2XtuTm09s8P6TcNPYOxK66duo@lists.infradead.org X-Gm-Message-State: AOJu0Yxd//UUzrEdtyW/rdUr26H4WQElBP42/Bda+ndszDryxuFiu9F9 QTtTydA99pvbDJxVrU0hqowfanxO4KwZ77Dx0IYIAUO+LxQV4WUDwUTXQ/jKnqsn/22ZTOciJlh 8O+FKPkkgngaGmnzI3CodRxXNxquvKoW3HRPZF7oNdNin8rrk3gGNLX6Gk/eA6TUEDofxHQyC X-Received: by 2002:a05:620a:3726:b0:7a1:e9a3:7ed5 with SMTP id af79cd13be357-7a674028608mr225746785a.21.1724224749848; Wed, 21 Aug 2024 00:19:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDcpjkeN2s+Pkah8lNRsAeGJCiY8h2x/UjZoGAkEUi08MzdlRaM+ySap03gvKQjNGS0t9n+w== X-Received: by 2002:a05:620a:3726:b0:7a1:e9a3:7ed5 with SMTP id af79cd13be357-7a674028608mr225743585a.21.1724224749534; Wed, 21 Aug 2024 00:19:09 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4ff013ef2sm596207885a.11.2024.08.21.00.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 00:19:09 -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 , Keith Busch 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 v2 2/9] fpga/dfl-pci.c: Replace deprecated PCI functions Date: Wed, 21 Aug 2024 09:18:35 +0200 Message-ID: <20240821071842.8591-4-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240821071842.8591-2-pstanner@redhat.com> References: <20240821071842.8591-2-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-20240821_001914_622255_49D5029C X-CRM114-Status: GOOD ( 14.85 ) 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 --- drivers/fpga/dfl-pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c index 80cac3a5f976..2099c497feec 100644 --- a/drivers/fpga/dfl-pci.c +++ b/drivers/fpga/dfl-pci.c @@ -41,10 +41,13 @@ struct cci_drvdata { static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev) { - if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME)) + void __iomem *bar0; + + bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME); + if (IS_ERR(bar0)) return NULL; - return pcim_iomap_table(pcidev)[0]; + return bar0; } static int cci_pci_alloc_irq(struct pci_dev *pcidev) @@ -296,7 +299,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; }