From patchwork Wed Oct 9 08:35:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13827796 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 5C643CED632 for ; Wed, 9 Oct 2024 08:37:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.813870.1226915 (Exim 4.92) (envelope-from ) id 1sySCM-0005pc-Gy; Wed, 09 Oct 2024 08:37:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 813870.1226915; Wed, 09 Oct 2024 08:37:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sySCM-0005oj-EL; Wed, 09 Oct 2024 08:37:34 +0000 Received: by outflank-mailman (input) for mailman id 813870; Wed, 09 Oct 2024 08:36:45 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sySBZ-0005FO-2h for xen-devel@lists.xenproject.org; Wed, 09 Oct 2024 08:36:45 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9b8b3771-8619-11ef-a0bd-8be0dac302b0; Wed, 09 Oct 2024 10:36:42 +0200 (CEST) Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-1xOK9-f3OGWC3-rITsu20w-1; Wed, 09 Oct 2024 04:36:40 -0400 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7afcd3945fbso184292185a.3 for ; Wed, 09 Oct 2024 01:36:40 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ae75615aa2sm439643585a.14.2024.10.09.01.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 01:36:38 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9b8b3771-8619-11ef-a0bd-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728463001; 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; bh=mOyNV1blUkGi8SBN/l2nmGqTH8tAJ4tec1wRLOcI2Z8=; b=c2YPoBJLb3+dibEsK193hHusnbThaSYTbjnwgisk4TP6N364RwPgMlF4RKqlJyj5zeBSnB WhZGuS49/b272eItXbIyLuXz43grN01icKcPQ9oNfu6zignJOyhCQ/pJNfeoiFRc5nE/it HX30RBDGEjUbcTUbGtw1MfZE95rQv9k= X-MC-Unique: 1xOK9-f3OGWC3-rITsu20w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728462999; x=1729067799; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mOyNV1blUkGi8SBN/l2nmGqTH8tAJ4tec1wRLOcI2Z8=; b=RiPPutncGjjwssUl6fB6Q0vuI9tlq4yi1D/XPhQJ65K/VHFIAPR2Cgg/zKd5abmNw7 MSZSVszTL214X4xs/MmhNCkvrjaR0NQMkc0rx7Ld8YF4ABZwZBHzxRhXQMFQqd8fJ1qJ ifgPzCTJsMK92fLMJSR9UkTKsuq8aEIsHpay3kdZG6vJk00kS03ZhAoKhBulDfXlef6p EheMU8uxi362LAW9sylAKpCHq7OO9tzWScpurw0yIhZuRu3VKLn2twhokfA+6yGQ35mK qEOfswmzgd/FOpDpYnq5B0abThgc5XdFue6u3QG13XZ+Io7pcFCcIGCeBxmL0UrCOUj8 QK2A== X-Forwarded-Encrypted: i=1; AJvYcCWumdr56Cg4kXeYEZd+ViYQJZCr9Soq3fVi9vmovaSBY7z23dTk5L5V48x7qmx9E0DrEhp4Jacq1A0=@lists.xenproject.org X-Gm-Message-State: AOJu0YwNF101GbjyRsNlmxvzJFYiGZN3vaw7no08QYNeAlWYbMFdGywJ GccWKk1gooniLJzKSRjPhdxD3sf0p+maLYN/QDlTQQp8eBmxjVLK/U/c/+QUl19wN26w3uiEPvV YSiggmCpdH9hwLM4pzbninYxCnHKRtayqCpBEi7h75LRcMlTHHrWUEWAen6qDcvoC X-Received: by 2002:a05:620a:29c7:b0:7a2:1db:e286 with SMTP id af79cd13be357-7b0874cd670mr234485685a.52.1728462999296; Wed, 09 Oct 2024 01:36:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFU56nfNbRn4xRa9L06f5Bja7V/qokH03xrDBZWS39o5ckdxWurQft3H7j0iSjtDvnBZDt4+Q== X-Received: by 2002:a05:620a:29c7:b0:7a2:1db:e286 with SMTP id af79cd13be357-7b0874cd670mr234479185a.52.1728462998841; Wed, 09 Oct 2024 01:36:38 -0700 (PDT) From: Philipp Stanner To: 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 , Philipp Stanner , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , 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 , =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Pierre-Louis Bossart , Maarten Lankhorst , Kai Vehmanen , Peter Ujfalusi , Rui Salvaterra , Marc Zyngier Cc: 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 Subject: [RFC PATCH 00/13] Remove implicit devres from pci_intx() Date: Wed, 9 Oct 2024 10:35:06 +0200 Message-ID: <20241009083519.10088-1-pstanner@redhat.com> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Hi all, this series removes a problematic feature from pci_intx(). That function sometimes implicitly uses devres for automatic cleanup. We should get rid of this implicit behavior. To do so, a pci_intx() version that is always-managed, and one that is never-managed are provided. Then, all pci_intx() users are ported to the version they need. Afterwards, pci_intx() can be cleaned up and the users of the never-managed version be ported back to pci_intx(). This way we'd get this PCI API consistent again. The last patch obviously reverts the previous patches that made drivers use pci_intx_unmanaged(). But this way it's easier to review and approve. It also makes sure that each checked out commit should provide correct behavior, not just the entire series as a whole. Merge plan for this would be to enter through the PCI tree. Please say so if you've got concerns with the general idea behind the RFC. Regards, P. Philipp Stanner (13): PCI: Prepare removing devres from pci_intx() ALSA: hda: hda_intel: Use always-managed version of pcim_intx() drivers/xen: Use never-managed version of pci_intx() net/ethernet: Use never-managed version of pci_intx() net/ntb: Use never-managed version of pci_intx() misc: Use never-managed version of pci_intx() vfio/pci: Use never-managed version of pci_intx() PCI: MSI: Use never-managed version of pci_intx() ata: Use always-managed version of pci_intx() staging: rts5280: Use always-managed version of pci_intx() wifi: qtnfmac: use always-managed version of pcim_intx() HID: amd_sfh: Use always-managed version of pcim_intx() Remove devres from pci_intx() drivers/ata/ahci.c | 2 +- drivers/ata/ata_piix.c | 2 +- drivers/ata/pata_rdc.c | 2 +- drivers/ata/sata_sil24.c | 2 +- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_vsc.c | 2 +- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 ++-- drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 +- .../wireless/quantenna/qtnfmac/pcie/pcie.c | 2 +- drivers/pci/devres.c | 24 +++---------------- drivers/pci/pci.c | 14 +---------- drivers/staging/rts5208/rtsx.c | 2 +- include/linux/pci.h | 1 + sound/pci/hda/hda_intel.c | 2 +- 15 files changed, 18 insertions(+), 47 deletions(-)