Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5745178pxb; Tue, 16 Feb 2021 06:40:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbS2dYCgzYfAwoTrEk172zkdevn3mZAOBTrRtdKt/0wqjUtg9W3bfXivzKiAJcYJEKrIh4 X-Received: by 2002:a17:907:2058:: with SMTP id pg24mr20553787ejb.441.1613486440340; Tue, 16 Feb 2021 06:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613486440; cv=none; d=google.com; s=arc-20160816; b=ZpGcVvQ7WcZij7mGAFnkLRCJ6i625dzA/96/R6nQdEQfzj+5Id61yoOw+aQl3Q4jh6 w2O1FJbwQYpOvYHeLCqJRsl1GlsS8h/SMxLAewqeq64ktkxgUGvAQ73yFnBcqYLQ4H7k tQKmNYAQXtsmhYaoi31PGk+/N8+jY5G41NZXVtPq1ODvi1Tq3as3UxUYAPoF7geQ/IS/ gmDHNySo0kNAbMjSjnrFL+1/VVr9Q5mnwdvKxlQLe/GcbzgMAAGgQYsqw+8ofYpmkEqz jnOW1ZE2KS2bOx2wJrFNhwi6CMVNxqHktU0j6s3NtGAfTTXmj3ZpRif3YHokMh8amRxE /uMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=wHcYyFqcZGI50UgBqMFL3J60ayH4uNrdHSCETRzCCi0=; b=Ozb2v1c7elyQvXBAdbRYDi9FMLgnp4h3h1QoDsvn40hK5x/n8B+uQ2Jayuo7as9DFQ xbTkSJeARFmXcjcgFmZ8cArJETTXt1IJGiIw/CI/h7an2RNdqN70VY6QM5lPWpd8aPoX OCK4mb4IMlMz8Hlqsy4mfYD6PTKig4kFLXUFa1CxLlZdEKggf2byhvmZT77R3WM+SHaB as3lATCDQVgvk9o6U+vV1uuyuVOV/LLeHYYzWGNU5GRtmABRNOqTdm2woIogCMoBktit uyT3lBh3Rx/DbhnK1dxufp+Lt0u2OueKHxd/xhAnR/ninvxNRI6Myo+yL/3uOjt66G5E bDEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XrbS4ZIL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot10si6183166ejb.282.2021.02.16.06.40.17; Tue, 16 Feb 2021 06:40:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XrbS4ZIL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230364AbhBPOiS (ORCPT + 99 others); Tue, 16 Feb 2021 09:38:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:35296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbhBPOgv (ORCPT ); Tue, 16 Feb 2021 09:36:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2924864DFF; Tue, 16 Feb 2021 14:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613486170; bh=iEqJxA00L6dMaNOXAq02SgmvRex2qObuXi66DZ29Mnw=; h=Date:From:To:Cc:Subject:From; b=XrbS4ZILLtDvrvMdtKn5IEgnWEmeJWTgUbyYhZshipR/g0pvUoCk/HUtqw1LEJFyL QRF0QHjcmPP8yHFjUxDZ7bi9uHyhQXsqD3hB0heF9LV8cHjvIOAzoveRJxhT23Mjtq TQdOkbO060vNTjtFZ3cLX152au/uvkOJkss0huH8= Date: Tue, 16 Feb 2021 15:36:07 +0100 From: Greg Kroah-Hartman To: Marc Zyngier , Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: [PATCH] irqdomain: remove debugfs_file from struct irq_domain Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no need to keep around a dentry pointer to a simple file that debugfs itself can look up when we need to remove it from the system. So simplify the code by deleting the variable and cleaning up the logic around the debugfs file. Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- include/linux/irqdomain.h | 4 ---- kernel/irq/irqdomain.c | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 42d196805f58..33cacc8af26d 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -150,7 +150,6 @@ struct irq_domain_chip_generic; * setting up one or more generic chips for interrupt controllers * drivers using the generic chip library which uses this pointer. * @parent: Pointer to parent irq_domain to support hierarchy irq_domains - * @debugfs_file: dentry for the domain debugfs file * * Revmap data, used internally by irq_domain * @revmap_direct_max_irq: The largest hwirq that can be set for controllers that @@ -174,9 +173,6 @@ struct irq_domain { #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY struct irq_domain *parent; #endif -#ifdef CONFIG_GENERIC_IRQ_DEBUGFS - struct dentry *debugfs_file; -#endif /* reverse map data. The linear map gets appended to the irq_domain */ irq_hw_number_t hwirq_max; diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 6aacd342cd14..367ff1c35f75 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1896,16 +1896,15 @@ DEFINE_SHOW_ATTRIBUTE(irq_domain_debug); static void debugfs_add_domain_dir(struct irq_domain *d) { - if (!d->name || !domain_dir || d->debugfs_file) + if (!d->name || !domain_dir) return; - d->debugfs_file = debugfs_create_file(d->name, 0444, domain_dir, d, - &irq_domain_debug_fops); + debugfs_create_file(d->name, 0444, domain_dir, d, + &irq_domain_debug_fops); } static void debugfs_remove_domain_dir(struct irq_domain *d) { - debugfs_remove(d->debugfs_file); - d->debugfs_file = NULL; + debugfs_remove(debugfs_lookup(d->name, domain_dir)); } void __init irq_domain_debugfs_init(struct dentry *root) -- 2.30.1