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.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 EF1E717624C for ; Tue, 20 Aug 2024 07:29:59 +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=1724139001; cv=none; b=T/qlIijlOB5DS9J4fGkG5LE8eKl0hf0B+qFnKkBIj8l7uqSsLgQ7TMIh+llhtpOnj56CAppxOTcG0OnRmlmhv7dcpVQJWxb8vtEQCLAYgrPO2TBJa/ATCg/Qh/2uWsENSgiKX8pglxY2ikadMuzfIMpU+eIgZC5vkkH/WFu6HIo= 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=YTMBITkc; 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="YTMBITkc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724138998; 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=YTMBITkc2hhZBql5z1ET4kq3sjVPnmgjZKJfAgsi8HhKf5/f9Uqdi3RAT73JDCDBb3UdK1 LWnpds7tCwp0eVf/+7S0uQ8yMJgDpwS3PRIf5/qJGk7vg5psG5I2JWaQ+Kp4xA/dylLco9 Z6VwZdxhCyE7MGH7jt4bHrkCneo/fkg= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-APyAezm9PrW5_jPyxq46hA-1; Tue, 20 Aug 2024 03:29:57 -0400 X-MC-Unique: APyAezm9PrW5_jPyxq46hA-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2efb2c3f288so9842941fa.1 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=SznhLI3AQY+lEEwve34zBgTQyBd2ebQJ8uV5lUKOwk2N6LTbsB9aKzNp83IMiKcqru Dvbh3A/143a9MYq9JDSpFwdeldqtIjvd0rN1S1EsSwFBucE0nDAo918IIZiw7vqp4qlB Qz8AChfAae0XEt3N5MUTr2JAErx1Gycf2ciQoU7EsPu9I/BjUsKwcM3nBP8/CJXliV2v iA+WXmFhEqdL4vmoHzdfH9hls/Q45AoIdMNyFZb4aRe9NrVH2tRW38bqYUF5Xh2+pDHn i7tq1VHLrqxk6aoyhktdP+06GsZXgiUsQ50/0SnqNCC8Ijqz2+YkNGlm5uQ8ty7hnG3f 6O+g== X-Forwarded-Encrypted: i=1; AJvYcCUbIQlkfTfVmPbfYpKrFeSQecISeIQt/cUw6V3WVuYQOKW+dfLSIFE0t1ChiFgS1A31eivbTbw6LZTx@vger.kernel.org X-Gm-Message-State: AOJu0YxLYFMn91yXWkHvPikneBXKxxzrUb65emOdWgsrl2QCTmx7pQbx X6jbM+jdX+4bezqAOjA5cij+4RRbAm/aRagZMG5Cz9/EfVfv4E4QW/LkcnCctMicAL6OoIxTTg2 Ez/79LlaB1UxdRgNp2RVDPAxU74r+uiWIeHJa+yBehx+d2fs0mO6s7uthfks= X-Received: by 2002:a05:6512:b26:b0:52e:9b87:2340 with SMTP id 2adb3069b0e04-5331c6e45bdmr4732138e87.6.1724138995625; 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-gpio@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