From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 DFF6616BE33 for ; Tue, 20 Aug 2024 07:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724139001; cv=none; b=J3TmcCGulBa0FNtQYKS4jT16JW5Hnp1iBC4y8y0sOYvrYyeE3f+6zWTZeijfxyf4rXENy7Mmvhq4qnyH59exA20PndDh+HSnS8Kl6cLYEukKEkO/HWhcmkWxXxLljHR9hGit+ENFgrO7JoVdP0OC737hfYT/Gm2TLMAQeXzCJQA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724139001; c=relaxed/simple; bh=XRWQQfF9fp4z+5+KZcBYEDuYz5gb8cHaJLDO6UaJEoo=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jSupI6YFrqdU55/PyW3Z2nPhMa2t4gEZqkGRlY/Eke4h+u5MxtTJl/bAavOvgwEBKiXdwuVxGL1+an5oSX08/imCH26NWiex6WQAADj9TC3RZbhhYptyykPxi+8CwV5NqRX2ZbriX0o+IqVEN+U26luSLeoXEH6VdIitl9E54G4= 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=V9sYfIv1; arc=none smtp.client-ip=170.10.133.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="V9sYfIv1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724138999; 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=v1KpD0+PO3KEd8vqUb0exw949el+ZQlXzH10gWUK9kY=; b=V9sYfIv1Ubog6Nr+QydMusH2/3qgNe4w9o4TM05j5Q2aDkfwU6h+/BW+vqdRCDKsH03A/L +Oz2sYAGcJCwbOJo/5wHZ9/BcQc6b3W/JLn1b292FOTlPaohdDvnCyt/GByl2tApLhLAvn eG02AEvEaen8EYFusFRDGOTm/3PJ+3w= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-Z_0JAjoRNoG1ihT-VcXPfA-1; Tue, 20 Aug 2024 03:29:57 -0400 X-MC-Unique: Z_0JAjoRNoG1ihT-VcXPfA-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52f028a33aaso202334e87.3 for ; Tue, 20 Aug 2024 00:29:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724138996; x=1724743796; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=v1KpD0+PO3KEd8vqUb0exw949el+ZQlXzH10gWUK9kY=; b=c6z2GXNnwoRnglSC4S3ngQo4UwwOzEe2h7gevZFO5tLfgqACmRjWCaBblVRvz/uZrr cNt2YU7onwVfBPu2vzy5ep56Sajn0M/pWri/IfdvLVGLg53c3WhoGlhuRlQRKUCiUWYv 6URemSwRqtcFP9qzRzk8JJ/CJwMNA9FIuAjFL7VVqJnPsDK+l0h6gYF7TxQrQ8GHr7QV MEWvBienUgdfj8D/A+yn8TI9u/PV6d0tWy6O++JJuo+6XXxFFjKlj0Gc38dcyYY9R7wj vtetTF/tNbBLsXlDpB3hIv9mvjlEAYxea4J2+x+nzs0+ZQT5CKI7y2BV7s1Ww6dL01fK 9O1Q== X-Forwarded-Encrypted: i=1; AJvYcCW4NIfJJp2Tv33SyQ5MZwVOabAPg+IV2PzAVBmhVJa0RcMuBQXC3KCkNBQpeyi+WODsUKyTFIMbWLl7pw==@vger.kernel.org X-Gm-Message-State: AOJu0Ywbmk25KvO9epPEVi3kFTKdJLLP99TexauRFjxM9JPLj8Lmkt85 HrlXxeRnbu2xkLErN6pSP5k13FkCcayd73cFv1tz7O6OndKhproKiXjKBTIErBdnM5lf1z+8NGs lrSa4ua7RFi4HNrXiOimam/9Wru/pwB3qp65yRNXQOA5bei+8GOtqOWH4Gic8 X-Received: by 2002:a05:6512:b26:b0:52e:9b87:2340 with SMTP id 2adb3069b0e04-5331c6e45bdmr4732149e87.6.1724138995629; Tue, 20 Aug 2024 00:29:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkOoAmJQBqRwOrXRXs1aVQSYuEizZw5AiMeBmrPImJpZCWeJexcEAw/Dy4dkV+vYq52Tea8Q== X-Received: by 2002:a05:6512:b26:b0:52e:9b87:2340 with SMTP id 2adb3069b0e04-5331c6e45bdmr4732103e87.6.1724138995010; Tue, 20 Aug 2024 00:29:55 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3dcc:1f00:bec1:681e:45eb:77e2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83839471b4sm725856366b.164.2024.08.20.00.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 00:29:54 -0700 (PDT) Message-ID: Subject: Re: [PATCH 4/9] block: mtip32xx: Replace deprecated PCI functions From: Philipp Stanner To: Andy Shevchenko Cc: onathan Corbet , Jens Axboe , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , 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 , Eugenio =?ISO-8859-1?Q?P=E9rez?= , Richard Cochran , Mark Brown , David Lechner , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Jonathan Cameron , Hannes Reinecke , Damien Le Moal , Chaitanya Kulkarni , "Martin K. Petersen" , 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 Date: Tue, 20 Aug 2024 09:29:52 +0200 In-Reply-To: References: <20240819165148.58201-2-pstanner@redhat.com> <20240819165148.58201-6-pstanner@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-1.fc40) Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-08-19 at 21:04 +0300, Andy Shevchenko wrote: > On Mon, Aug 19, 2024 at 06:51:44PM +0200, Philipp Stanner wrote: > > 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()"). > >=20 > > In mtip32xx, these functions can easily be replaced by their > > respective > > successors, pcim_request_region() and pcim_iomap(). Moreover, the > > driver's call to pcim_iounmap_regions() is not necessary, because > > it's > > invoked in the remove() function. Cleanup can, hence, be performed > > by > > PCI devres automatically. > >=20 > > Replace pcim_iomap_regions() and pcim_iomap_table(). > >=20 > > Remove the call to pcim_iounmap_regions(). >=20 > ... >=20 > int mtip_pci_probe() >=20 > > =C2=A0setmask_err: > > - pcim_iounmap_regions(pdev, 1 << MTIP_ABAR); > > + pcim_release_region(pdev, MTIP_ABAR); >=20 > But why? EMOREINFOREQUIRED Why I replace it or why I don't remove it completely? >=20 > ... >=20 > mtip_pci_remove() >=20 > > =C2=A0 pci_disable_msi(pdev); > > =C2=A0 > > - pcim_iounmap_regions(pdev, 1 << MTIP_ABAR); >=20 > This is okay. Removing it is okay, you mean. >=20 > ... >=20 > > =C2=A0 pci_set_drvdata(pdev, NULL); >=20 > Side note: This is done by driver core for the last 10+ years=E2=80=A6 Ah you know Andy, kernel programmers be like: "When you're hunting you better make sure the wild sow is really dead before you load it in your trunk" ;p P. >=20