From nobody Tue Nov 26 22:27:10 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 386F2206971 for ; Wed, 16 Oct 2024 09:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729072170; cv=none; b=Kq6a/E7zJdmGOvYAQ9jE73TpYLkaSLfg4mWdup0QUdPvTrk3PbfQny4Yj1Fy04UNDAhrXU/dI/sXkyLL4QCu6xPaJ9314Rq4s07NXP4YI5VUi5lKYLl+k3IF2U6wAmfGWziwcsO3PtPtYrMus3wh12gb9dQn9XHmsOPrYEAFnxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729072170; c=relaxed/simple; bh=73TDRRq/zYwVvdvTcMvRKEXzW3B5e+Rcch7EgZqO0Rk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YRHf9ZIW8NusgYmeUdl8UnMoJN/Kl9cDBmWVxm9nHaLDFRy3/f1b9XMWV9KeRmCWqSIExFvN9SYN2KN/fX1owEn8Og/RBzWHqFr2FHxSe+RlGtahP7sTgNYq91CHl+EcMp6616CIfJUgZ1bApXAtFYMNeAFzh9ImdUSIqkh/djo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=LK6PM3M4; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LK6PM3M4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729072166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=99YHQrhHcKN4EzxQy/kG1c7OXMv2lQ3JH0aSkE1MYKM=; b=LK6PM3M4MwBe6G45KCCcqddK5j2gTJrRIj81Ap9pDZBTvFhUxr8kQAq1+TcO/xYFc2tgd9 m3XJ+sovx4HqHtIPNEnPyJld49ZUCNn/0uPCWY9BF/WSzL4U8PV90ZkbKdtNq9T31apYKI Cg4/WcifTEJMQmc4DHFHn6o6Hv3BNKs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-320-mhGZuRybOQKX6cDQXHGw9A-1; Wed, 16 Oct 2024 05:49:24 -0400 X-MC-Unique: mhGZuRybOQKX6cDQXHGw9A-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-43052e05c8fso42997345e9.2 for ; Wed, 16 Oct 2024 02:49:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729072163; x=1729676963; 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=99YHQrhHcKN4EzxQy/kG1c7OXMv2lQ3JH0aSkE1MYKM=; b=PksC8JuOJ0Z+FHeOb4R3mO82dgKSk6GshIy/dS97+ZR6IvUg378AEv9QuoVgMUOUEp D6uUDoACh3mujv582SfWebZni/TvPbhy5Y69kJgpTbEHKTL+Mb8GJkntbtbNQkzmDgRs T9uCuJYZ2Uyu+daIeFvtWNS4I4kWA7ZbxPMznHVPgwBiC4EuZHkP2D5elKTpQFOicrBf zMKmFKqUb/Bq1946aGRfW0jtBFlSpvcDhoNoJPJT9efQfApZhN1TAPiR4LGjQouSMbF4 /N9GwHbosmENwVZOR7s+bceXfxfdi/4yQfZwj0jDOo6oueATZRU/S61E89h9+qPRitnH UrtA== X-Forwarded-Encrypted: i=1; AJvYcCWZsCsCc+PBXZQ6IMIFimwsNmHQrzqprCJUTr3vFLbwKka8tKnhiUvt7cv95zkkGusIGCsutHDl7e9FPng=@vger.kernel.org X-Gm-Message-State: AOJu0YyDRUFkhL0AgFTEA0anq4q3Ct4k0Oo78M0QvrTzRr6lVXDi3HKl pGGct8bUqNd1E2Wgn2YYdC5CwDTMYb3SWEWYBUOrVNX0YrHUVVFQYHe3+lwHQP9H3jpADzyE2X6 3fwfiAg9KXlGPqxO4yIDD9EwTwQW6ZVHR2oTItVMbFp7JP+uHBPy/LLirmj4cYg== X-Received: by 2002:a05:600c:1c04:b0:42c:aeaa:6aff with SMTP id 5b1f17b1804b1-4311ded42e9mr155157755e9.10.1729072162885; Wed, 16 Oct 2024 02:49:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8GDQhvsGyXA0X961v7Lmwi/hfrpQA8HclfLV7tXU7H8VLe8dIqSWkJPDQe2YmlweB9M9Vbw== X-Received: by 2002:a05:600c:1c04:b0:42c:aeaa:6aff with SMTP id 5b1f17b1804b1-4311ded42e9mr155157405e9.10.1729072162522; Wed, 16 Oct 2024 02:49:22 -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-4314b32e487sm28190235e9.25.2024.10.16.02.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 02:49:21 -0700 (PDT) From: Philipp Stanner To: 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 , Bjorn Helgaas , Richard Cochran , Damien Le Moal , Hannes Reinecke , Philipp Stanner , Chaitanya Kulkarni , Al Viro , Li Zetao Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v8 3/6] fpga/dfl-pci.c: Replace deprecated PCI functions Date: Wed, 16 Oct 2024 11:49:06 +0200 Message-ID: <20241016094911.24818-5-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241016094911.24818-2-pstanner@redhat.com> References: <20241016094911.24818-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andy Shevchenko 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 */ }; =20 -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 =3D pci_msix_vec_count(pcidev); @@ -235,9 +227,9 @@ static int find_dfls_by_default(struct pci_dev *pcidev, u64 v; =20 /* start to find Device Feature List from Bar 0 */ - base =3D cci_pci_ioremap_bar0(pcidev); - if (!base) - return -ENOMEM; + base =3D pcim_iomap_region(pcidev, 0, DRV_NAME); + if (IS_ERR(base)) + return PTR_ERR(base); =20 /* * 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, } =20 /* release I/O mappings for next step enumeration */ - pcim_iounmap_regions(pcidev, BIT(0)); + pcim_iounmap_region(pcidev, 0); =20 return ret; } --=20 2.47.0