From nobody Wed Nov 27 04:29:46 2024 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 EF60515687D for ; Mon, 14 Oct 2024 07:53:46 +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=1728892429; cv=none; b=fi4+N2xIuZI/2EGMqEr61b/8X0cVLGJlrkIvAVa9VDKjFUdP0MGPT8hHyG59LnJg7JfTJIg4FtbCsx3fsRb6XJk0bzpZqOyH83Ho6RpUGocTzDRa+iR+NoKE+HHx0hc2fnlcIu7+lJDKOVd8WQi0jztr1f/jBB6kbcOGjcWmVtU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728892429; c=relaxed/simple; bh=nDMOGSQ2XtB3JrRu0EJ9o56SNXK6RwOh++m09iUxd1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nljPThOozQcwLSiBn5eqCQI7t5sjDl2E5PDzUaa0K/U0/NsZKeqhmDj69+SpvF7faT+bzlmhq+ZZQ11uMaF4UOXoN/qgWEYA5LOiXxOn9JygqV9RILC8i4eFH0wvp8+CnJ47jvCp1pgmwrimll02DArGEqf6d4IA+uhfOUUPWnw= 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=E+0MSFvU; 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="E+0MSFvU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728892426; 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=0OVHqbDsKjJZaqCqMxaVmR0wTbzvoxMvtns9x4ea75c=; b=E+0MSFvUoW0z5PNWvXHkPNR23a5QpwM6ocZm0qD37cHIWEJvmgMqXwNo8sWY4QuC4W29ga m4UJDTKMzmBYBFojEp4jJGpt6lDE+G1NfexoMtixgGUd8YTljnHwM6IK6jmDRY1zx16UiL dqdN6NIJ4Wd6eagkZaeYPoQNpJQNylc= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-vYlLRQIaPPmurbbu2lzimQ-1; Mon, 14 Oct 2024 03:53:43 -0400 X-MC-Unique: vYlLRQIaPPmurbbu2lzimQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a9a1b872d8bso6384966b.1 for ; Mon, 14 Oct 2024 00:53:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728892422; x=1729497222; 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=0OVHqbDsKjJZaqCqMxaVmR0wTbzvoxMvtns9x4ea75c=; b=lhMHy+9y5RN6xKKhgkEvBKuOhKTmubp0laRu4kuuXRmU35ybCVoKHvWGB+KQPXLC5d Qbid6ahT+hZ/YPLqHu8oN2FBssfGKVlmGQba7B2AhDbMosCxyQ6PG3RJ36hSBSFWpgPR Jy1TKPoEzXNrGQbCOlCRCLzcmp2PO1HtLCVopRNE0rNo1pxJHA4v4mQfcwzQdl0OUK/O ptGAOxxj3vFtgzmy83y8GYnihFFyPEGpadfvtDzce4PZ2b/2+O3RvnR1AGKbCynJA7ow H2Cf5YqBShwyo5z9dDskjcVTUMBaCbMibiNaICceQ6a0vgiX3syyVmGYr2rk8Cz/wc5G 7KKg== X-Forwarded-Encrypted: i=1; AJvYcCWsqVu7bPgb5kqj6p5xkFpdl7WF7lZGb8ELf42QAw0lQkm8DqvkWbkT/GDqbLvA/mKCmLitZS81+j07DSc=@vger.kernel.org X-Gm-Message-State: AOJu0YzYgTiwGn0FSi8gRyxpM+yxPUvgoq9XmK3uAeklNUTukifqKzSu R435i1B7gWyHBgw4/SirtwXohex3tjv3VHtgnlC530YFoGJtWZmO3iX/KVWyFSSXwuKtdVIhIbD wbVEET3bnUKyvPMLvw9JIcalf4IeMQ7di95MqnrCyUQQ0WQjhCoAaobtEoSvG6w== X-Received: by 2002:a17:907:3a96:b0:a9a:183a:b84e with SMTP id a640c23a62f3a-a9a183abb4emr54363466b.40.1728892422224; Mon, 14 Oct 2024 00:53:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8RdNLydaZorD0CCxm2b4SOOSEXdTQ49hlT5/qPmabsGXJC6XJB2cZBBIAjLdsQqSMvFgt4Q== X-Received: by 2002:a17:907:3a96:b0:a9a:183a:b84e with SMTP id a640c23a62f3a-a9a183abb4emr54360066b.40.1728892421849; Mon, 14 Oct 2024 00:53:41 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82d3798001d5778cfc1aeb0b3.dip.versatel-1u1.de. [2001:16b8:2d37:9800:1d57:78cf:c1ae:b0b3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99f86fa986sm243291666b.92.2024.10.14.00.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 00:53:41 -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 , Al Viro , Keith Busch , Philipp Stanner , 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 v7 5/5] ethernet: cavium: Replace deprecated PCI functions Date: Mon, 14 Oct 2024 09:53:26 +0200 Message-ID: <20241014075329.10400-6-pstanner@redhat.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241014075329.10400-1-pstanner@redhat.com> References: <20241014075329.10400-1-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()"). 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 Acked-by: Paolo Abeni --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 7 +++---- 1 file changed, 3 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..984f0dd7b62e 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; =20 - err =3D pcim_iomap_regions(pdev, 1 << PCI_PTP_BAR_NO, pci_name(pdev)); + clock->reg_base =3D pcim_iomap_region(pdev, PCI_PTP_BAR_NO, pci_name(pdev= )); + err =3D PTR_ERR_OR_ZERO(clock->reg_base); if (err) goto error_free; =20 - clock->reg_base =3D pcim_iomap_table(pdev)[PCI_PTP_BAR_NO]; - spin_lock_init(&clock->spin_lock); =20 cc =3D &clock->cycle_counter; @@ -292,7 +291,7 @@ static int cavium_ptp_probe(struct pci_dev *pdev, clock_cfg =3D readq(clock->reg_base + PTP_CLOCK_CFG); clock_cfg &=3D ~PTP_CLOCK_CFG_PTP_EN; writeq(clock_cfg, clock->reg_base + PTP_CLOCK_CFG); - pcim_iounmap_regions(pdev, 1 << PCI_PTP_BAR_NO); + pcim_iounmap_region(pdev, PCI_PTP_BAR_NO); =20 error_free: devm_kfree(dev, clock); --=20 2.46.2