From patchwork Mon Aug 5 08:01:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13753217 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 1E26915350D for ; Mon, 5 Aug 2024 08:02:12 +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=1722844934; cv=none; b=OZ1Aql6bmjB9U3Ej1NGmTBqvPKDduz1wftx4G82Nvatt1epyxHRAgr03NHCA6hvv54HFSLOOl9kXSVY0T9FtMK3hJxAw+Z05mHtw2mhKSTWsvmjeSPadw0Ph3rKa2b4DdmRVXfY7mVYe9ly6cyV7Q619nyJlMqSbp0EngbU925I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722844934; c=relaxed/simple; bh=zFYt4YA/nxrpBwmvCREd85ce7Gyci93GVdK3Ep0M2pA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nr5LEmmGxtbE2HWGSTG+Sn9S2X5AkXpkVXrJScZqSPVNJJCqa0hw5VwOQ1NXZwnJQOCf1UzeQbIBKtqLMegcFC2L0h5nzWLM4D+4kBos6FwXXv+z4Dq/XTLlKP+RPi9q51vWANf39xpIH/FKnT17IyYB1K74pG0buHOdVGRAM8s= 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=KsPyCMPK; 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="KsPyCMPK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722844932; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=KsPyCMPKMF6aRA6vCsXCO55GU7BPmdfskYZDFEKXfqhtUKroc0zyVytDhhzvwJGIX7lwCv lt1B2HtObSZBnmtyxbFVPrfuLjOZcgGX+bv9Ut+jrBszFm1qP9awo+eABNBcSlXIz3vNKm Az8Sca4hzOxocakNpfEb0nxHMba/Eaw= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130-urytQEiYOg-ARgFzrKBbew-1; Mon, 05 Aug 2024 04:02:08 -0400 X-MC-Unique: urytQEiYOg-ARgFzrKBbew-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5a11cd40426so1597285a12.1 for ; Mon, 05 Aug 2024 01:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722844927; x=1723449727; 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=18fF+PB7j6Y1mDUBH32CYamjOEignK7RbqTPKzQv2/I=; b=sjZTTkYe2vR1NmG/MWoKDIvf0kJxrANMqxyw8FWv0J7AjAjdI0iq9QNr7g3AxQkLKo HDWiif7+HugDCgNpRnQKS1RoTaPP30Uofnxt2t05YkxDKpd1ZqPDQBDslyOkeUJ7uT54 mXoCeqMQd/DUpwext2OzxwuwrK+NOONP003ePKfRfxmv8dLaXq/iF+L+8u6DT4+IRfeY l9IlPs/j59kXEqNlVH6+0ibMAfd5WVcOMEa6Qnozf453kBzDfKohNp5WZH9C3OWaMf1U ZXGxqIM7hI8fLIrsM6R+zGuP5n7Cad4mxjvzrT1zREIVHYzzqdJLNzL5FhKW3el80Ija 27BA== X-Forwarded-Encrypted: i=1; AJvYcCXvBRbvGASdJVb8d1RfJp3cMIx1ks47JVXRZtTbAkPw4NHsKB3zkGYNw10gS6pU6/MT9/Jtotd0mRs9qQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yz0PngMDkGmbnkG8zH6irIdylfRwCaA5D/9FO+w/f17ADqD5BwS ayA2lmItCwa7M/ppNawPW5K11BwqKJsn7xEqqf8Re5mURV96qfAhhhjybfk6NizjEolc1Wo6+qa GRDyI9mKc6KNmT2YB8g0nLR3NzM507d4/voh6G7pGxGWJhHjPMbyEwq6Fq24+ X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456320566b.3.1722844927334; Mon, 05 Aug 2024 01:02:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkXCT45DdZBHWQzoU0ORUWv+2ODBb2GUKjo+7GIEAxb39igJSvCRB2n7e9CZjTjRwueB8GGw== X-Received: by 2002:a17:907:3da7:b0:a7d:a4d2:a2a7 with SMTP id a640c23a62f3a-a7dc4e50c01mr456317566b.3.1722844926788; Mon, 05 Aug 2024 01:02:06 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82df07e000a5f4891a3b0b190.dip.versatel-1u1.de. [2001:16b8:2df0:7e00:a5f:4891:a3b0:b190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7de8d0868bsm277958966b.143.2024.08.05.01.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 01:02:06 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Andy Shevchenko , Philipp Stanner , Jie Wang , Adam Guerin , Shashank Gupta , Damian Muszynski , Nithin Dabilpuram , Bharat Bhushan , Johannes Berg , Gregory Greenman , Emmanuel Grumbach , Yedidya Benshimol , Breno Leitao , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , John Ogness , Thomas Gleixner Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH v2 02/10] ata: ahci: Replace deprecated PCI functions Date: Mon, 5 Aug 2024 10:01:29 +0200 Message-ID: <20240805080150.9739-4-pstanner@redhat.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805080150.9739-2-pstanner@redhat.com> References: <20240805080150.9739-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com pcim_iomap_regions_request_all() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions() Signed-off-by: Philipp Stanner Acked-by: Damien Le Moal --- drivers/ata/acard-ahci.c | 6 ++++-- drivers/ata/ahci.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 547f56341705..3999305b5356 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c @@ -370,7 +370,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = pcim_iomap_regions_request_all(pdev, 1 << AHCI_PCI_BAR, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) @@ -386,7 +386,9 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id if (!(hpriv->flags & AHCI_HFLAG_NO_MSI)) pci_enable_msi(pdev); - hpriv->mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR]; + hpriv->mmio = pcim_iomap(pdev, AHCI_PCI_BAR, 0); + if (!hpriv->mmio) + return -ENOMEM; /* save initial config */ ahci_save_initial_config(&pdev->dev, hpriv); diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index a05c17249448..905af6b68d80 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1869,7 +1869,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* AHCI controllers often implement SFF compatible interface. * Grab all PCI BARs just in case. */ - rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); + rc = pcim_request_all_regions(pdev, DRV_NAME); if (rc == -EBUSY) pcim_pin_device(pdev); if (rc) @@ -1893,7 +1893,9 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (ahci_sb600_enable_64bit(pdev)) hpriv->flags &= ~AHCI_HFLAG_32BIT_ONLY; - hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; + hpriv->mmio = pcim_iomap(pdev, ahci_pci_bar, 0); + if (!hpriv->mmio) + return -ENOMEM; /* detect remapped nvme devices */ ahci_remap_check(pdev, ahci_pci_bar, hpriv);