Skip to content

Commit

Permalink
genirq/debugfs: Remove pointless NULL pointer check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Jun 24, 2017
1 parent 8d9d51b commit c2ce34c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 0 additions & 7 deletions kernel/irq/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* This file is licensed under the GPL V2.
*/
#include <linux/debugfs.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>

Expand Down Expand Up @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion kernel/irq/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2ce34c

Please sign in to comment.