debugfs_remove() has it's own NULL pointer check. Remove the conditional
and make irq_remove_debugfs_entry() an inline helper
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
*
* This file is licensed under the GPL V2.
*/
-#include <linux/debugfs.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>
&dfs_irq_ops);
}
-void irq_remove_debugfs_entry(struct irq_desc *desc)
-{
- if (desc->debugfs_file)
- debugfs_remove(desc->debugfs_file);
-}
-
static int __init irq_debugfs_init(void)
{
struct dentry *root_dir;
#endif /* !CONFIG_GENERIC_PENDING_IRQ */
#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
+#include <linux/debugfs.h>
+
void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc);
-void irq_remove_debugfs_entry(struct irq_desc *desc);
+static inline void irq_remove_debugfs_entry(struct irq_desc *desc)
+{
+ debugfs_remove(desc->debugfs_file);
+}
# ifdef CONFIG_IRQ_DOMAIN
void irq_domain_debugfs_init(struct dentry *root);
# else