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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F659C43217 for ; Fri, 10 Dec 2021 22:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345403AbhLJWYq (ORCPT ); Fri, 10 Dec 2021 17:24:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344689AbhLJWWp (ORCPT ); Fri, 10 Dec 2021 17:22:45 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80AB2C061746; Fri, 10 Dec 2021 14:19:08 -0800 (PST) Message-ID: <20211210221814.109408832@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639174747; 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=/T/lIugtjOnyOk0TOzZkPoZByXefF1LfjuDkNv8axwo=; b=2rQSESBNbhKDe4DIdH7ra10NH5N/JvzQQX+r3nrmLIoKqrr9kZeroIW0ldFyNTmeGJFloC ISsswuI9KpOlM49GqMXH1uDQDqjLlmAlQoCaIdP7ARZeSM4ju5lyK7EP81ugww1ZARaI0U gs8iQLYx9ZSJzL1t8RYEPf2MxfBf9s3ISeJpYwzJfbY1LP66IiQlEYyWZX7TWUuOhSSd+j QHxdKtWvMywJW5kM8KxC3ozfxn1n0BTwgqRspa0SYdoFjxiNskgkH3+l7apaPtovsFTCir /eDE+8+FyfScKQW4ZXlPNkEBA8QbEEVsBNZpySv69uV9FsqHgFVMgDuCMRqbdQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639174747; 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=/T/lIugtjOnyOk0TOzZkPoZByXefF1LfjuDkNv8axwo=; b=LGRIOOkKk9uMR58nBNuiyz1GmYXNgyyKXlS10xIQmOgbQ/Jkk7kTacYFZo0PvPLyf49QPl HjCMGi+rlPtSyrDA== 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 , Greg Kroah-Hartman , Juergen Gross , xen-devel@lists.xenproject.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , dmaengine@vger.kernel.org, Mark Rutland , Will Deacon , Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org, Jassi Brar , Peter Ujfalusi , Sinan Kaya Subject: [patch V3 15/35] platform-msi: Let the core code handle sysfs groups References: <20211210221642.869015045@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 10 Dec 2021 23:19:06 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner 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); }