Commit-ID: c2ce34c0a0e5187195ecade872be950d2611ba68 Gitweb: http://git.kernel.org/tip/c2ce34c0a0e5187195ecade872be950d2611ba68 Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Sat, 24 Jun 2017 11:05:59 +0200 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Sat, 24 Jun 2017 11:43:53 +0200 genirq/debugfs: Remove pointless NULL pointer check 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@xxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> --- kernel/irq/debugfs.c | 7 ------- kernel/irq/internals.h | 7 ++++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c index dbd6e78..4d384ed 100644 --- a/kernel/irq/debugfs.c +++ b/kernel/irq/debugfs.c @@ -3,7 +3,6 @@ * * This file is licensed under the GPL V2. */ -#include <linux/debugfs.h> #include <linux/irqdomain.h> #include <linux/irq.h> @@ -191,12 +190,6 @@ void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc) &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; diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index 5fd105e..a573e07 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -318,8 +318,13 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear) #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 -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |