Skip to content

Commit

Permalink
powerpc/eeh: Fix build failure with CONFIG_PROC_FS=n
Browse files Browse the repository at this point in the history
The build fails with CONFIG_PROC_FS=n:

  arch/powerpc/kernel/eeh.c:1571:12: error: ‘proc_eeh_show’ defined but not used
   1571 | static int proc_eeh_show(struct seq_file *m, void *v)

Wrap proc_eeh_show() in an ifdef to avoid it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210314093300.131998-1-mpe@ellerman.id.au
  • Loading branch information
mpe committed Mar 29, 2021
1 parent 7a0fdc1 commit 7a7685a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,7 @@ int eeh_pe_inject_err(struct eeh_pe *pe, int type, int func,
}
EXPORT_SYMBOL_GPL(eeh_pe_inject_err);

#ifdef CONFIG_PROC_FS
static int proc_eeh_show(struct seq_file *m, void *v)
{
if (!eeh_enabled()) {
Expand All @@ -1594,6 +1595,7 @@ static int proc_eeh_show(struct seq_file *m, void *v)

return 0;
}
#endif /* CONFIG_PROC_FS */

#ifdef CONFIG_DEBUG_FS

Expand Down

0 comments on commit 7a7685a

Please sign in to comment.