Skip to content

Commit cd1be31

Browse files
committed
EDAC, pnd2_edac: Fix !EDAC_DEBUG build
Provide debugfs function stubs when EDAC_DEBUG is not enabled so that we don't fail the build: drivers/edac/pnd2_edac.c: In function ‘pnd2_init’: drivers/edac/pnd2_edac.c:1521:2: error: implicit declaration of function ‘setup_pnd2_debug’ [-Werror=implicit-function-declaration] setup_pnd2_debug(); ^ drivers/edac/pnd2_edac.c: In function ‘pnd2_exit’: drivers/edac/pnd2_edac.c:1529:2: error: implicit declaration of function ‘teardown_pnd2_debug’ [-Werror=implicit-function-declaration] teardown_pnd2_debug(); ^ Signed-off-by: Borislav Petkov <bp@suse.de>
1 parent 1c5bf78 commit cd1be31

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/edac/pnd2_edac.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,11 @@ static void teardown_pnd2_debug(void)
14351435
{
14361436
debugfs_remove_recursive(pnd2_test);
14371437
}
1438-
#endif
1438+
#else
1439+
static void setup_pnd2_debug(void) {}
1440+
static void teardown_pnd2_debug(void) {}
1441+
#endif /* CONFIG_EDAC_DEBUG */
1442+
14391443

14401444
static int pnd2_probe(void)
14411445
{

0 commit comments

Comments
 (0)