From patchwork Fri Oct 25 14:59:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 839099 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 C9EE720D4EB for ; Fri, 25 Oct 2024 15:00:53 +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=1729868457; cv=none; b=V27OqqB+bKHksd8jMf/z/CQR08l5q8ifMuLn0oAtdZIWncTMUt3igrhlS2FlzNq3o6eOeqCOaeLyBWo8Kr6MeDZcLtH93HLyeqTp7ooJIvVC6bmHQNLDRArzk3wgRI7xl5RrxF0cxtHgXPkhEO4cLSOMiBLoGa8ZL6TSl1NsfzA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868457; c=relaxed/simple; bh=KRhL2deOZRHNfuo7/CizyodCPj2p+YqlhuhaNJFSYuE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AmUyTG0JxF3ykxAhg2nMb7RaynGeUrSd0Bf8T8e0XXeceMQra4o8y8yd/mKFPdyQ9fTDfZlncY2h6r+/iPvsK8LtHvawISwcnTeiiDPeb+h3pXJz3kp51fD/OHSSyg+TMRbXWjWNJzQV8263+lsHjO5sZUqSPJcOUAizGTZbx64= 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=RxW/3y1Y; 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="RxW/3y1Y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868452; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=RxW/3y1Ybqg7gcH27RSIKgvB2qeDTG6YoD+UEMD9qLmnhXjbxJw/YWoRRiWWVgNdd6Yayd JXPtLcWlz4643Y9aoUS6yw07aBK6sILYb7qGYdFqhxcqOPp1IfsMQQg4su+SFKgNgAEBy0 CLO/UAhQJiTHpL03Gt3P3qiL8EZrq+I= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-_slT62dIMue5BpNa5wwLRw-1; Fri, 25 Oct 2024 11:00:51 -0400 X-MC-Unique: _slT62dIMue5BpNa5wwLRw-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d45de8bbfso1474088f8f.3 for ; Fri, 25 Oct 2024 08:00:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868450; x=1730473250; 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=oH83zA24aoDnwtpuZ+wclLhu+n7qeaaZUv7+D6hfs+0=; b=BZb05Ir2xH/pivWvdmeVTH5wXkFKaOvBUhRoiv12fjWyw6nNLjqR4pBQ4NbhmdGmnT dpzWDle0ONTPYWKTZ+362IYE+LZisc+BsmOZ6kKdf9Ughs91fD30KIbXzEfc23U4Kr9P oP7ymKw0MZY2a2OAYtX93Aoz269znizpHq1tgRh8Jp7W7A9K5lpSAsC2bt8r+VFSsc68 GXPuOSnsNL7SsxhjJCSzyjfN4kbMC/YDxWHN/5O96of+50jQsgMOVzxWSCvm3/3b1oYJ Jyd9Gcuwa/zn65Ms8mwoee05OpV5pMz8yBi8QFPfrRKxUlxaylfCILYtU2P6sUFnM1Wd BZQg== X-Forwarded-Encrypted: i=1; AJvYcCXyvFjh43ZHcHnbnYbTwMfO+4KH9UDBkzKB1Jwhh4E6EPw8UNFca6/YAK9lyFEk4JCnieeG1tXvNnAPW6w=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4aWkeN7PVP+tR8qyu2K2rWFJLCuRehsZUJkKz6HGIWDMSnHuk eIC6NLgfjsPn3p0TUzd1+ksgeqa7U778TAliDElP4kYaKFAonPVbWDX/d0Y07LHGvxH5q31VWni Elr31q93qcmPmmX8Vk+gWA0B2BI9JAj9RBQBXnOlyU9pUjLhrvqGIOIKEdGbDtw== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039804f8f.2.1729868448853; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1JzvMg8cr6yZm3DrYA37QNNdDoszBRAqVfY9P7gwJlqkM8x7H1LKy5SQs7DHzYJeG4eaDSg== X-Received: by 2002:a5d:4e08:0:b0:37d:95a7:9e57 with SMTP id ffacd0b85a97d-37efcee8c28mr8039706f8f.2.1729868448084; Fri, 25 Oct 2024 08:00:48 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:47 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?utf-8?q?Ilpo_J=C3=A4rvi?= =?utf-8?q?nen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 07/10] ntb: idt: Replace deprecated PCI functions Date: Fri, 25 Oct 2024 16:59:50 +0200 Message-ID: <20241025145959.185373-8-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Signed-off-by: Philipp Stanner Acked-by: Serge Semin --- drivers/ntb/hw/idt/ntb_hw_idt.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c index 6fc9dfe82474..544d8a4d2af5 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c @@ -2671,15 +2671,20 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) */ pci_set_master(pdev); - /* Request all BARs resources and map BAR0 only */ - ret = pcim_iomap_regions_request_all(pdev, 1, NTB_NAME); + /* Request all BARs resources */ + ret = pcim_request_all_regions(pdev, NTB_NAME); if (ret != 0) { dev_err(&pdev->dev, "Failed to request resources\n"); goto err_clear_master; } - /* Retrieve virtual address of BAR0 - PCI configuration space */ - ndev->cfgspc = pcim_iomap_table(pdev)[0]; + /* ioremap BAR0 - PCI configuration space */ + ndev->cfgspc = pcim_iomap(pdev, 0, 0); + if (!ndev->cfgspc) { + dev_err(&pdev->dev, "Failed to ioremap BAR 0\n"); + ret = -ENOMEM; + goto err_clear_master; + } /* Put the IDT driver data pointer to the PCI-device private pointer */ pci_set_drvdata(pdev, ndev);