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 BA5B81BC9E9 for ; Thu, 10 Oct 2024 09:11:43 +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=1728551506; cv=none; b=QUag+0Juby4xHeXSefREoPF19MVNkgaEKaVRbw5YCAqgwKgpkU16X7jOCEBHtKc/2pHrGsm57tq0w4ujis4lqaRNoMo1lwPdgJ/HJlJY+sUesap+alr4ePXrYwjldkeF6PoMXUg+0TPe8d3/alFPR5s3lpqy0QB6FIJyuZd3ZiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728551506; c=relaxed/simple; bh=+ex92FX/6NsvBWmXun+uf0gF3wK3BeTi9EqHuTvNsZQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=DwrcGPETTtmBNRg+IRSr1bvEnQiskRcgVs89DLUbEZRKBddD8bZ0m+35lp+tN/4X1+VUwtOYRp8PpSH7luIu+NyZxza2j/n1BAwAE895/UXJta4f3ZNyB8PKuiPhwv73ife2lk+35+LwHRPgRoPcUX9Phw4dgyfEzv2BhLk+6UY= 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=NJq4mpTA; 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="NJq4mpTA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728551502; 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=+ex92FX/6NsvBWmXun+uf0gF3wK3BeTi9EqHuTvNsZQ=; b=NJq4mpTAcVEpju4GP7UXQ3tFtQq/iwJKZbaUcP9X8XyhDE1gvMJPTtOarmmgE9+I0rCPf4 yeWON2JS3SedQ18+NhFqPdsIwG8QoFVuC3GYByzq0eMLlsw+e1MugbE70jLtAxPVn6b1tl 1n9SCjjvdqeNfSsVtuq3LybW+vJVIeA= 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-241-9EdBzaRRPsSy5B6iqYBGIQ-1; Thu, 10 Oct 2024 05:11:40 -0400 X-MC-Unique: 9EdBzaRRPsSy5B6iqYBGIQ-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-536800baa8aso728186e87.2 for ; Thu, 10 Oct 2024 02:11:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728551499; x=1729156299; 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=+ex92FX/6NsvBWmXun+uf0gF3wK3BeTi9EqHuTvNsZQ=; b=fZubIcZlqmze8WN012fEork019pYhNlhbatSPHWqbmoTgwPcbY6iXVKW2ZDGZMJpQ+ yHjiWYVXGSdE8BKKp3d5HnUdjvyxJ/nZ2UsErwubvd3Yzy7W/MJ3y8dpq8ekCv+hch9B 1nAumbvVR4XvD7Cpd6KQG4JR4Ea0L4O8hbTMrEjX1LBfxiT/KZIJ1zxdacWubtlzu9Ga oYEwUsZX6T9BhTYzapGV0RRlLFpsAgX2LKuEauklEYdyOrYZnGty/MiRSkxvX5HBYDcv ythy7lqVIrFFJWuT2k2iJGXflDhDacN/ArSej1jhDQihom5jgXJc4HUW8IJMga7iaGtb sjQw== X-Forwarded-Encrypted: i=1; AJvYcCUkGURKrFmnp+xeBUTB0hIf9OoAVqjnHHIGleDoW/L0V/tzhf4XFW+lrkp0FX64AXDzLU/Up20=@vger.kernel.org X-Gm-Message-State: AOJu0YyI4zwVDd0jpovsTxsCA0U5VSVU+75weQLbRp1qmK36eOtqVZmc Fie/j60enIaxuBmjAoApP9AZaOOWyHRICbk2C+owCUcJob1h3uqd6HqzctIr4oYwlFVzVIzvPuQ yfMhqz5X7IBvx02exUC1a5QyzWCKZHCz22X7s6/RTtXUJO/rPE0V77w== X-Received: by 2002:a05:6512:10d1:b0:536:55ae:7444 with SMTP id 2adb3069b0e04-539c4896eb7mr3177278e87.22.1728551499293; Thu, 10 Oct 2024 02:11:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExq3OJhlyNTGpjtR1+LjaW3R0iv5Mu7sB9drW/xRJaoCLaoe8gSPgF49M2/ruF8wr/J6TLJA== X-Received: by 2002:a05:6512:10d1:b0:536:55ae:7444 with SMTP id 2adb3069b0e04-539c4896eb7mr3177227e87.22.1728551498734; Thu, 10 Oct 2024 02:11:38 -0700 (PDT) Received: from dhcp-64-16.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d4b79fdc2sm949476f8f.88.2024.10.10.02.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 02:11:38 -0700 (PDT) Message-ID: Subject: Re: [RFC PATCH 13/13] Remove devres from pci_intx() From: Philipp Stanner To: Dan Carpenter Cc: Damien Le Moal , Niklas Cassel , Sergey Shtylyov , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Jaroslav Kysela , Takashi Iwai , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Mostafa Saleh , Andy Shevchenko , Hannes Reinecke , John Garry , Soumya Negi , Jason Gunthorpe , Yi Liu , "Dr. David Alan Gilbert" , Christian Brauner , Ankit Agrawal , Reinette Chatre , Eric Auger , Ye Bin , Marek =?ISO-8859-1?Q?Marczykowski-G=F3recki?= , Pierre-Louis Bossart , Maarten Lankhorst , Kai Vehmanen , Peter Ujfalusi , Rui Salvaterra , Marc Zyngier , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-staging@lists.linux.dev, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sound@vger.kernel.org Date: Thu, 10 Oct 2024 11:11:36 +0200 In-Reply-To: <7f624c83-115b-4045-b068-0813a18c8200@stanley.mountain> References: <20241009083519.10088-1-pstanner@redhat.com> <20241009083519.10088-14-pstanner@redhat.com> <7f624c83-115b-4045-b068-0813a18c8200@stanley.mountain> 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-10-10 at 11:50 +0300, Dan Carpenter wrote: > On Wed, Oct 09, 2024 at 10:35:19AM +0200, Philipp Stanner wrote: > > pci_intx() is a hybrid function which can sometimes be managed > > through > > devres. This hybrid nature is undesirable. > >=20 > > Since all users of pci_intx() have by now been ported either to > > always-managed pcim_intx() or never-managed pci_intx_unmanaged(), > > the > > devres functionality can be removed from pci_intx(). > >=20 > > Consequently, pci_intx_unmanaged() is now redundant, because > > pci_intx() > > itself is now unmanaged. > >=20 > > Remove the devres functionality from pci_intx(). Remove > > pci_intx_unmanaged(). > > Have all users of pci_intx_unmanaged() call pci_intx(). > >=20 > > Signed-off-by: Philipp Stanner >=20 > I don't like when we change a function like this but it still > compiles fine. > If someone is working on a driver and hasn't pushed it yet, then it's > probably > supposed to be using the new pcim_intx() but they won't discover that > until they > detect the leaks at runtime. There wouldn't be any *leaks*, it's just that the INTx state would not automatically be restored. BTW the official documentation in its current state does not hint at pci_intx() doing anything automatically, but rather actively marks it as deprecated. But you are right that a hypothetical new driver and OOT drivers could experience bugs through this change. >=20 > Why not leave the pci_intx_unmanaged() name.=C2=A0 It's ugly and that wil= l > discorage > people from introducing new uses. I'd be OK with that. Then we'd have to remove pci_intx() as it has new users anymore. Either way should be fine and keep the behavior for existing drivers identical. I think Bjorn should express a preference P. >=20 > regards, > dan carpenter >=20