From patchwork Wed Aug 21 07:18:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13770946 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 1AB7CC52D6F for ; Wed, 21 Aug 2024 07:23:33 +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=QonVrXjXLVkm8MWiElcEuvoR+8 1x0OSrg7dO4Sm6np35OIABQ7PZn6cFUtoEo9fzNFJQFCdTAgLSRwtHClasTXOsge6mzkJjPuLL3Zg baGjtQEhE4N55HmncZZh5k1JRrfOXfV4OBHRHLWcEqJ1WKcdubpa1msADPTB8OjEo74h7pcAoKb6d F//chHLLlJmmsYy9GD/4sLBpbAGJpuv8aCoui4gnnPjpIpyMhkgJ7AYckUa5ynlmTVkJTIk3UngTm IO9CcFzWNDUOF/2gPL/36XXW7dWO7nmElSrdJACGkNS7b+2OmyFzasqI4kRObtA6jFfMlpa/KuSzK GKtyYWoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgfgf-00000007tDy-1z4U; Wed, 21 Aug 2024 07:23:21 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgfcw-00000007rkx-1wN8 for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 07:19:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724224769; 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=czZtN/9W3qyfHz9C5ioSyv/J/YIS5BozSU463Bnid7NNXxk99D8CXTSuYjcBvDodYCMLMx fHkCN2lXzoKV6FJege4FKNbLCvg9E6IEaLwJ3NCHj/GG/nclVkfRdt1uCcJ/cuvjbHbp89 tnwEYFV98jvJaVT+hjg3DNubBiQmU/Q= 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-152-rS8ELARXMAiLaJZTsTN3NQ-1; Wed, 21 Aug 2024 03:19:26 -0400 X-MC-Unique: rS8ELARXMAiLaJZTsTN3NQ-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7a20d58da41so824003585a.1 for ; Wed, 21 Aug 2024 00:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724224766; x=1724829566; 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=ZzyudDM1rxicHMQdgKr0H3vatRugcHwuLFXbCflEtnc367RU0XFJIY0G8Zk02vicJr VjiXrns3hF5JS+OZRGFnCZVVdqQlSQl9ldMzrSQRLCEL5X3US4G9i7KSSc/sQ3P9iWZ4 Uk/GtL0k5l6K6TcLlxYo7wWR73UG2zJdZRUfx3zfSEuFU886dVPNOwNRqaZpFZLzSseE etJmKT5gt6H7JvbwcIf9ARg3/4VpwXNCieJ3O2jtREy8ldHbBCSoX3Y/9ne4VzfVORRm KKKbVnn2vCbyxKbQ5h29g8WhYN+or3x7WSYVTaIIhRwjleypQhhsxjHEtbBZUiw6WXv3 ECTA== X-Forwarded-Encrypted: i=1; AJvYcCU/KC7sTraeP+PoDlX++1dN0o31vRgWsFcPseI5pplZ3a76UHFDi6rFTtFgiCXsmF6FrrM2aIbiECVMeg5FRi8E@lists.infradead.org X-Gm-Message-State: AOJu0YyBIcTr8b9bboAKSj0+viLioXRNl9Pk62HLWjzeh/Qu7fR24exB iVM0+MJwUt8VAVk7gHgmXS/N1tJx/v30Dsw7O9/iqqhyK1BxUjLeJunXAOSavLKndAjwfGZQbHs ZVWjNE3KeQrTKcbkDx7+EN80EOyRm5K0Wm6HuSRq837euEbRA+3UB1zz6QJaETGkbj15g20VV X-Received: by 2002:a05:620a:4447:b0:7a6:6b98:8e36 with SMTP id af79cd13be357-7a6748f3e18mr161732885a.16.1724224766183; Wed, 21 Aug 2024 00:19:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmBWfs7G37gw0gXLs+jJ1ak3VoPRzhFXnnqGnvalRJy1Z9qU/iCGfIEx/5sYtw8Qbb8DqgNA== X-Received: by 2002:a05:620a:4447:b0:7a6:6b98:8e36 with SMTP id af79cd13be357-7a6748f3e18mr161728685a.16.1724224765719; Wed, 21 Aug 2024 00:19:25 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4ff013ef2sm596207885a.11.2024.08.21.00.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 00:19:25 -0700 (PDT) From: Philipp Stanner To: Jonathan 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?= , Philipp Stanner , Damien Le Moal , Hannes Reinecke , Keith Busch 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 v2 5/9] ethernet: cavium: Replace deprecated PCI functions Date: Wed, 21 Aug 2024 09:18:38 +0200 Message-ID: <20240821071842.8591-7-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240821071842.8591-2-pstanner@redhat.com> References: <20240821071842.8591-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-20240821_001930_578755_07FF733D X-CRM114-Status: GOOD ( 14.64 ) 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);