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: 12660095 X-Patchwork-Delegate: bhelgaas@google.com 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 9061AC433F5 for ; Mon, 6 Dec 2021 22:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358481AbhLFWmp (ORCPT ); Mon, 6 Dec 2021 17:42:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358270AbhLFWml (ORCPT ); Mon, 6 Dec 2021 17:42:41 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 743DFC061746; Mon, 6 Dec 2021 14:39:12 -0800 (PST) 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) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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); }