From patchwork Thu Aug 22 13:47:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13773551 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 9D2B9C3DA4A for ; Thu, 22 Aug 2024 13:52:48 +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=l7QcQ8ciA5m5x+rq2s8zI0jgiw i9SUzNQfv12/Gj18wqR52P4StoAhojHN9kezyCK3YESL7UaA7E5Afl29SGxVxHokhOVqorAaXJHBL JiiHiUOBWUgle1wwxTcMQDtJLRgOWg0XIxGsjGY6pF9hPNEyRsg3AlIm/TFaVXwMF9EYHY6CpQ2gJ cSupKqvC8CJteplsaSGWxwrFQAGbGg933O4lRGOE7h5AZ1MX8P8RYuBz5+8Wx5Vk1fRKVQP+xa9Q3 f+sSTkw1qOQ3D2gKfSlIi47YtDs8zezS6mMUXCH50/b0ksiMl0DpOoVINBE99v8cOMQ7qKx9Q3xv7 oO55nfWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8Eu-0000000D2Ob-33iZ; Thu, 22 Aug 2024 13:52:36 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh8Ac-0000000D0jt-3f8u for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 13:48:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724334490; 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=Mzli9v02OmQAsQKRvY8aHCmI8MRnjpfNg+QpoiUO97m7SmUZ6ixpjz6GtJyZsxj62/lsNc AgwzNJHszOatSnj2KF49G0v6CmQz7I6QonB/rSVPSdb6qW3Ypl5t+ROoVNgro2OLMsV9+l 7oFHDVUlcsTA1Qf7/AItRcr4u9x4xLs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-43-aFjzzyDZO3ClY5gxrZsFSg-1; Thu, 22 Aug 2024 09:48:07 -0400 X-MC-Unique: aFjzzyDZO3ClY5gxrZsFSg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42809eb7b99so4693175e9.0 for ; Thu, 22 Aug 2024 06:48:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724334486; x=1724939286; 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=sgj4+NSQ8cIjz3TnWhRAH2yeiynCH65PvZekhcVBYpboc9TfaDsSCC2WeGgBGezL91 5iwmEgglcN3zUeBujwbn2B8QsRn+wZhzNXv+nYS+ioHojzBbX5xIM/3aq0Cqsx+WAv93 jaaeh6ZGrgi882kBCxciuj8WnmOmCo6fID6wA3miApDq55lQWmqyy0ZTr7YV6BBltWzb g+3wwgR+0TduNcMe0kPxyyDXsMbqTmNHBfzx7cPjlu/St1fXV6yVwN/Zs5BUDIy5G3NZ /vm47g65bw3HjxC0iRkMEW/gvLU+v0RnGdG3olAAoOCtj1Lz6tGKvbEDkaDWgQ1U2Wzc 0/AA== X-Forwarded-Encrypted: i=1; AJvYcCXDb8cO+kJVfr9ZBMm8Wwj6sGY7hxNB2mBUbFfsPi5VpsUw+lxa1+FAh8JLZtQ8NS/2Oi2M4ldp18umc1Ppkjna@lists.infradead.org X-Gm-Message-State: AOJu0Yxlq7YKLSg0enyq+D2sB/M2P1j14yWQ+n2fx/MTNlHfQDb2HVd5 CbZ1bWR4SJ06V/g5fX8JuFn1Hjitx6y5nsvjgYMSX8IIgSvl8wjQcwiojSgzYaUoEzr/HdQ1XaF F+gi7u9LXOCaHDJY6vIOiVRm9cbsXaPO1DQ9ZdyeIeaHlZd0NQy7eZTyXG305p1urZ87Tgx1o X-Received: by 2002:a05:600c:5112:b0:426:63bc:f031 with SMTP id 5b1f17b1804b1-42ac3899e09mr16337145e9.1.1724334486179; Thu, 22 Aug 2024 06:48:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRSoYjY+fRaVMhy3JkraKLBSrGHIYEYva7zoKLHV+1g1iMr3Zs/N1D05tQ7XJx0t0ZIIxXpg== X-Received: by 2002:a05:600c:5112:b0:426:63bc:f031 with SMTP id 5b1f17b1804b1-42ac3899e09mr16336835e9.1.1724334485558; Thu, 22 Aug 2024 06:48:05 -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 5b1f17b1804b1-42ac5162322sm25057215e9.24.2024.08.22.06.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 06:48:05 -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 , Chaitanya Kulkarni 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 v3 5/9] ethernet: cavium: Replace deprecated PCI functions Date: Thu, 22 Aug 2024 15:47:37 +0200 Message-ID: <20240822134744.44919-6-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240822134744.44919-1-pstanner@redhat.com> References: <20240822134744.44919-1-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-20240822_064811_046375_98231E58 X-CRM114-Status: GOOD ( 14.27 ) 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);