From patchwork Mon Aug 19 16:51:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13768731 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 DC547C52D6F for ; Mon, 19 Aug 2024 17:04:35 +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=AJtm3uYD4inmsDECmrMxkvS6gTo4VXXtBuq4LxNQ/Aw=; b=Fk+OBrB7xhwVXk3fJfXCLhZ6LK JOzHZv+H7bOSNG+I6lK1KS5TDTiQSsmFYUGLTav0aSJ324JuQ7zp0VKiZKiG2QE0x9FsNBmNuMqMJ adW59H7dNK8+FB2MF3PiRf31QNgaXC0eoyKe2htpzZNAQptAziT+oHt4bp+yynnihraQZmgXkbCe6 egGSTCpjXa40Sb0WTK4/kHag5KVi0b9SVQeQvUK4j6nvEs0ixBc+2DXKNWvruyZNQaaVgNY6V+aIQ 00VHKhyFtoCZBmXaFXSIJmvbddlHjHge+AoHmo0KxYkzVmUryIem3IKWWRBklp50OwnmmzMus0mAj 3UE6iuXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5ns-00000002JIA-3He3; Mon, 19 Aug 2024 17:04:24 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5d9-00000002Fmn-2Mfh for linux-arm-kernel@bombadil.infradead.org; Mon, 19 Aug 2024 16:53:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=AJtm3uYD4inmsDECmrMxkvS6gTo4VXXtBuq4LxNQ/Aw=; b=KZyi1d19vMWFey4Off17xqFjDk Z+kSq+9wEfZDyv4uS2hdT0ydboX/p719BA9F5m/XqQXZAQgYAKxgaDot5x2OaCWK84UC6KGy23I0L NGCLbsqEqfGmopQkLrmi2f1Br6fRX4bQGhXr16PuWb65SdtCw6gs8chrlrcoqmVbtkyhYmZYNsZ1V VQpV0MdmTXdzylfRSzbUgK1anxi/4wKlU+jN3fdsRs1WsGFcC1Aokadl6q+YrTZ4wHSLeQHLhuJeS uRzsFkq9NSrzSSNMaFc5Lcr+e6lUwZ0iME3s1hZdDv0F4BMs0zz/99V946sEQrbhYAAkjDqWoziAJ oVkatheg==; Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg5d5-00000009Axk-2nQS for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 16:53:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724086385; 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=AJtm3uYD4inmsDECmrMxkvS6gTo4VXXtBuq4LxNQ/Aw=; b=NzAor+PGnf5+WT5iIc0xg+OQgtqnYC3NpKboFMK4u6nRXoaH3lYfZ/xi2zaFNls9F8Vkcf m1Mo7zQWoWenwQPJOvyi/TB1ehcsQKPwvGnW52BAjn8gC8tca+787Tmo3EAx5kXy+nRMZY tmziglT62CVx9N9SbrSZa1ymZgZEdBU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724086394; 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=AJtm3uYD4inmsDECmrMxkvS6gTo4VXXtBuq4LxNQ/Aw=; b=cPt+reKj/gzahOH2p/g3jvrJfUWAhPIRhPiMpppbTq0Z9kGoHALvMvI5zoI3A0f+EfWoc+ oIaMahQd+xGmniq7mVqWFDpWt4DdTHsp6COCc3NkpyTZw+hcar7gilsWI4lXKwaS5eiJOE wzhhCH4rOO72iUCvGMRrZ7xwFFonKNU= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-61UdRns7OReRnlNdcwvHDw-1; Mon, 19 Aug 2024 12:53:02 -0400 X-MC-Unique: 61UdRns7OReRnlNdcwvHDw-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7a1d6c57f9fso9258685a.3 for ; Mon, 19 Aug 2024 09:53:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724086382; x=1724691182; 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=AJtm3uYD4inmsDECmrMxkvS6gTo4VXXtBuq4LxNQ/Aw=; b=qTcX8HBYeflvSxdcfZqtExwEPVVXfAd9qqWC2x0ABlOBCTxcV4C6QmZwqEUYzBdWrn 04sSWgcvKvmaQSCRt13R2j+5euaeRnrx2UiEHS/nvhUUcOFtXRktO/Y55R+mtP91LHGb 28XIgzMMglnxm/ccvHgrrX4JBWqtH/M6KWxyG/sZYVqZVfuK7NgG488HzU0QJpX+aVwm lspVGvmBuhUta9Wd3BsvzA8HgEA+t3Q7K/96aQhERjZ79wQUbzu0+jyJ76XQHnxHZTdq vVeV2xjqhaUJ3dMVl+sntOLsXDN/ZwiDBZMFZiWHi4yeLXBK7vLo1CKp2X6GtCCI84i3 aZCQ== X-Forwarded-Encrypted: i=1; AJvYcCXgF/kRo7VmQYfsjWSQV2KxHjLW5BNhE848Uf2tQpOZL9YejFpdLXnkYDJoqWhF+hOBC5vvn3dqB5UkyOEAcfLH@lists.infradead.org X-Gm-Message-State: AOJu0YwQi5Bc5hH+iaRVvGtzUd7zCYvh0sUleehlXBpqYm+nzckdVL2i hSWT6s9kaPY9VmSIhqLTCYksqIx4TvSQzyBqDjMGv5M2wnyPZW2k/q0MA9fEuLND1EAswXtEwbK y4CAHE2VH8g9VAL6j5gS+vvqfObzYUH8iLxAQdWJb1IclPSUCkZ3HszyhOiKCPuYEBlj+b/kn X-Received: by 2002:a05:620a:17a6:b0:7a4:ee81:b81 with SMTP id af79cd13be357-7a5069097d7mr907155185a.2.1724086381784; Mon, 19 Aug 2024 09:53:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHM6gYVZPDs45ylp2PC1pdcluR4bdODQrU3S0OZZmC5BxWlFh+hxwevOPD/dWhGJl7MG9Gdkw== X-Received: by 2002:a05:620a:17a6:b0:7a4:ee81:b81 with SMTP id af79cd13be357-7a5069097d7mr907153385a.2.1724086381333; Mon, 19 Aug 2024 09:53:01 -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 af79cd13be357-7a4ff01e293sm446579885a.26.2024.08.19.09.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 09:53:01 -0700 (PDT) From: Philipp Stanner To: onathan 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?= , Jonathan Cameron , Philipp Stanner , Hannes Reinecke , Damien Le Moal , Chaitanya Kulkarni , "Martin K. Petersen" 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 6/9] ethernet: cavium: Replace deprecated PCI functions Date: Mon, 19 Aug 2024 18:51:46 +0200 Message-ID: <20240819165148.58201-8-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240819165148.58201-2-pstanner@redhat.com> References: <20240819165148.58201-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-20240819_175316_138971_DA8B5A6E X-CRM114-Status: GOOD ( 13.87 ) 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()"). Replace these functions with the function pcim_iomap_region(). Signed-off-by: Philipp Stanner --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c index 9fd717b9cf69..1849c62cde1d 100644 --- a/drivers/net/ethernet/cavium/common/cavium_ptp.c +++ b/drivers/net/ethernet/cavium/common/cavium_ptp.c @@ -239,11 +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)); - if (err) + clock->reg_base = pcim_iomap_region(pdev, PCI_PTP_BAR_NO, pci_name(pdev)); + if (IS_ERR(clock->reg_base)) { + err = PTR_ERR(clock->reg_base); goto error_free; - - clock->reg_base = pcim_iomap_table(pdev)[PCI_PTP_BAR_NO]; + } spin_lock_init(&clock->spin_lock); @@ -292,7 +292,7 @@ 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); + pcim_iounmap_region(pdev, PCI_PTP_BAR_NO); error_free: devm_kfree(dev, clock);