From patchwork Tue Aug 27 18:56:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13780033 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 510531D4175 for ; Tue, 27 Aug 2024 18:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724784995; cv=none; b=IJzVO38mesyj6ShoFceXjqTQywr2o9LPn0o9fsHZ+vqhg7LFlXohGJYRblmeymXCXV7c6jUcr9PAMsBDrnXRqTmszv+8kEvzIBKt8jqK7NRREBFz91eVM543PfQHBDHf/09aY4Qkffa4DChkvU+m+/Qt82s/pVgQDQD9u+LEn5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724784995; c=relaxed/simple; bh=ARR42U31SsfvWWCrHwbXesPCT1d63Wp8dyC5fYwgRtc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lTgNmnUeQVulDzk5dS+ENwfVtV1++3mMbflWYoZ3WI2ibdnjJPW0B/CD5G3Uyr/rb9NQ4G2Nv+q4acu9vAenzORpXMfz7NGLPUtmzD3IVavW3EvUyLUHKK1WWNJ1TS/WdgHsbr3DUEFC42Tnf6I3IAHtEeTqfspnkmf9U3dvwT4= 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=OFQEUApw; arc=none smtp.client-ip=170.10.129.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="OFQEUApw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724784991; 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=ot52nkK/Na0X35bsJx5mf+W03nkANhJiuieinuTtF+Y=; b=OFQEUApwQbs08IymIEu3CA4E2SKCuML2oYlQaIhxuYYGTvHdNdqe/AZ+0j8HNeALR06687 8vhlUmf+5lEivN4hq+b/ydE+aunys24sv+mLppL04a0XpGOsmQhruXLF09D9gbuMwUMPCG 69uxWZWjBncUTD79YWjAqMiRHknH4ks= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-345-qCWW4rhAOHaox-RmJWCHaA-1; Tue, 27 Aug 2024 14:56:30 -0400 X-MC-Unique: qCWW4rhAOHaox-RmJWCHaA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a8698664af8so765882666b.0 for ; Tue, 27 Aug 2024 11:56:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724784989; x=1725389789; 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=ot52nkK/Na0X35bsJx5mf+W03nkANhJiuieinuTtF+Y=; b=CCa9iFESTxpsFohBJ8YylmbybWsSAvsTagZY7zkEIVLJtiyIsUlElXU4SUSox3zj5P //OcpPAJ+xsACkDTroWjaeIciWTEcE7m3n1JP7LsJO/ORX+kZa+Vyc6YdHQJHmbcYgY8 01+Dwq2cqnJHjAKS6WUvj/92/7goaXFsz/v2Hxh/pOwI5UR/Pdbd9qE1h/hfmlVHQmy0 R2bzHmWjQnIY4vMirgDdHPmocCB4We0kgUFlqwFz9AEHm+FGsFCiYUF94c2uOv/du1Fw jIxI3JWEEP0ooj4ducvbhskJF7JcCnxuCzKu1S5vgGhUyh1g5GeAO5htdLC3PYpqNawu 7NdA== X-Forwarded-Encrypted: i=1; AJvYcCXoU/kb3Phkj5ocanV91Xoci5p/JHSsCnELzi3pG85zJlVKc3DvYEHrWfNHKU/0ZRxBW4zaWI2J838=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3g86gBdawdfPC4xMPOa6krB5JP4+6bLv9T1x2FAiDkhUm8RoQ iXGz2i61+6l9bMOSDII3vmHBl4OY3vyPZZkaZI6DA8HXA7D6UvHKlG3h4XQ+XTqjTy/fMwaCOF1 oin92oS1GUAHynzhUkKDpSjRSrKAH8CD/KgPSh13FMKiyO9hlARtYYq1oOQ== X-Received: by 2002:a17:907:968b:b0:a77:dbf9:118f with SMTP id a640c23a62f3a-a870589d7bemr19232266b.13.1724784988744; Tue, 27 Aug 2024 11:56:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpPIsWnweTtHk2jYqlmIfKSsDaoipOeMWhXQ4B5bGcQn25jUZvX7EeAh161EGEDUYY0nmhrA== X-Received: by 2002:a17:907:968b:b0:a77:dbf9:118f with SMTP id a640c23a62f3a-a870589d7bemr19227366b.13.1724784988317; Tue, 27 Aug 2024 11:56:28 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3dbc:3c00:460c:db7e:8195:ddb5]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a86e549c4e9sm141473066b.47.2024.08.27.11.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 11:56:27 -0700 (PDT) From: Philipp Stanner To: ens 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 , Alvaro Karsz , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Richard Cochran , Damien Le Moal , Hannes Reinecke , Keith Busch , Philipp Stanner 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, virtualization@lists.linux.dev Subject: [PATCH v4 5/7] ethernet: cavium: Replace deprecated PCI functions Date: Tue, 27 Aug 2024 20:56:10 +0200 Message-ID: <20240827185616.45094-6-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827185616.45094-1-pstanner@redhat.com> References: <20240827185616.45094-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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()"). Furthermore, the driver contains an unneeded call to pcim_iounmap_regions() in its probe() function's error unwind path. Replace the deprecated PCI functions with pcim_iomap_region(). Remove the unnecessary call to pcim_iounmap_regions(). Signed-off-by: Philipp Stanner --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c index 9fd717b9cf69..914ccc8eaf5e 100644 --- a/drivers/net/ethernet/cavium/common/cavium_ptp.c +++ b/drivers/net/ethernet/cavium/common/cavium_ptp.c @@ -239,12 +239,11 @@ static int cavium_ptp_probe(struct pci_dev *pdev, if (err) goto error_free; - err = pcim_iomap_regions(pdev, 1 << PCI_PTP_BAR_NO, pci_name(pdev)); + clock->reg_base = pcim_iomap_region(pdev, PCI_PTP_BAR_NO, pci_name(pdev)); + err = PTR_ERR_OR_ZERO(clock->reg_base); if (err) goto error_free; - clock->reg_base = pcim_iomap_table(pdev)[PCI_PTP_BAR_NO]; - spin_lock_init(&clock->spin_lock); cc = &clock->cycle_counter; @@ -292,7 +291,6 @@ static int cavium_ptp_probe(struct pci_dev *pdev, clock_cfg = readq(clock->reg_base + PTP_CLOCK_CFG); clock_cfg &= ~PTP_CLOCK_CFG_PTP_EN; writeq(clock_cfg, clock->reg_base + PTP_CLOCK_CFG); - pcim_iounmap_regions(pdev, 1 << PCI_PTP_BAR_NO); error_free: devm_kfree(dev, clock);