From patchwork Mon Dec 6 22:39:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12660179 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 81D1CC4332F for ; Mon, 6 Dec 2021 22:48:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.240041.416241 (Exim 4.92) (envelope-from ) id 1muMlq-0007G7-5f; Mon, 06 Dec 2021 22:47:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 240041.416241; Mon, 06 Dec 2021 22:47:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMlp-0007Ek-Te; Mon, 06 Dec 2021 22:47:41 +0000 Received: by outflank-mailman (input) for mailman id 240041; Mon, 06 Dec 2021 22:47:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMdc-0004ul-Jt for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 22:39:12 +0000 Received: from galois.linutronix.de (galois.linutronix.de [193.142.43.55]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 54db4abf-56e5-11ec-8a4d-196798b21f7b; Mon, 06 Dec 2021 23:39:11 +0100 (CET) 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: 54db4abf-56e5-11ec-8a4d-196798b21f7b Message-ID: <20211206210438.146453385@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638830351; 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: references:references; bh=NDdACHNkETpAg6PVNWE42mBs5Rd33bpzz4k5zrHM7tw=; b=vErMpjt+MCZSBS1ICGFQpx4ysNXbGwI+93xws8KfOZfVncryB+KTjslkXPz+B27v8EaHZT 0Hc5pfViilVyeeiPM+G5xX8YBHj2/SlqdOEdtJyvNVzLD0hXKGtaBjAMQvKGAyOcP5OWm8 cZUt/UKPbhSBS0DZsLaRMRntX2BWFbl2Dqkd5iUmlbFUyw5dbrKuYFwA7j5HIKO6tE6hM/ Ulq3WbR/oBGKMKMTG/Ab7aXWiIISpxs0RrF5z4w7VdpbPWgrEPTVj8VT052BuUhjWhtLSN +fOMgQuwcu1sxL0cXpwsBnZgKW2ZC+hBiIuczvBS/Jx+NbjXaTC560HQvAnolw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638830351; 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: references:references; bh=NDdACHNkETpAg6PVNWE42mBs5Rd33bpzz4k5zrHM7tw=; b=WM5V9C6MO1EBchUpOkknWZtZQWNoaCYH46V0rZmCJD95akbr+ZDoZFYNhOj++9Z/kWQmKb rKp4y6urxJvnScBQ== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , xen-devel@lists.xenproject.org, Juergen Gross , Greg Kroah-Hartman , Will Deacon , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, Vinod Koul , Mark Rutland , Robin Murphy , Sinan Kaya Subject: [patch V2 09/36] platform-msi: Let the core code handle sysfs groups References: <20211206210307.625116253@linutronix.de> MIME-Version: 1.0 Date: Mon, 6 Dec 2021 23:39:10 +0100 (CET) Set the domain info flag and remove the local sysfs code. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- drivers/base/platform-msi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) --- a/drivers/base/platform-msi.c +++ b/drivers/base/platform-msi.c @@ -23,7 +23,6 @@ struct platform_msi_priv_data { struct device *dev; void *host_data; - const struct attribute_group **msi_irq_groups; msi_alloc_info_t arg; irq_write_msi_msg_t write_msg; int devid; @@ -191,6 +190,7 @@ struct irq_domain *platform_msi_create_i platform_msi_update_dom_ops(info); if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) platform_msi_update_chip_ops(info); + info->flags |= MSI_FLAG_DEV_SYSFS; domain = msi_create_irq_domain(fwnode, info, parent); if (domain) @@ -279,16 +279,8 @@ int platform_msi_domain_alloc_irqs(struc if (err) goto out_free_desc; - priv_data->msi_irq_groups = msi_populate_sysfs(dev); - if (IS_ERR(priv_data->msi_irq_groups)) { - err = PTR_ERR(priv_data->msi_irq_groups); - goto out_free_irqs; - } - return 0; -out_free_irqs: - msi_domain_free_irqs(dev->msi.domain, dev); out_free_desc: platform_msi_free_descs(dev, 0, nvec); out_free_priv_data: @@ -308,7 +300,6 @@ void platform_msi_domain_free_irqs(struc struct msi_desc *desc; desc = first_msi_entry(dev); - msi_destroy_sysfs(dev, desc->platform.msi_priv_data->msi_irq_groups); platform_msi_free_priv_data(desc->platform.msi_priv_data); }