From 82eba124407e972fa1b1d97c28fedbf66cd01cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nahuel=20G=C3=B3mez?= Date: Sat, 26 Oct 2024 19:08:42 -0300 Subject: [PATCH] exynos-pm: fix build without CONFIG_SEC_PM_DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We remove the checks to allow the function to be used anyway. ../drivers/soc/samsung/exynos-pm/exynos-pm.c:107:10: error: declaration of 'struct wakeup_stat_name' will not be visible outside of this function [-Werror,-Wvisibility] 107 | struct wakeup_stat_name *ws_names) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:114:18: error: incomplete definition of type 'struct wakeup_stat_name' 114 | name = ws_names->name[bit]; | ~~~~~~~~^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:107:10: note: forward declaration of 'struct wakeup_stat_name' 107 | struct wakeup_stat_name *ws_names) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:131:25: error: no member named 'ws_names' in 'struct exynos_pm_info' 131 | if (unlikely(!pm_info->ws_names)) | ~~~~~~~ ^ ../include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:143:51: error: no member named 'ws_names' in 'struct exynos_pm_info' 143 | exynos_show_wakeup_reason_sysint(wss, &pm_info->ws_names[i]); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:465:11: error: no member named 'ws_names' in 'struct exynos_pm_info' 465 | pm_info->ws_names = kzalloc(sizeof(*pm_info->ws_names) * n, GFP_KERNEL); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:465:47: error: no member named 'ws_names' in 'struct exynos_pm_info' 465 | pm_info->ws_names = kzalloc(sizeof(*pm_info->ws_names) * n, GFP_KERNEL); | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:466:16: error: no member named 'ws_names' in 'struct exynos_pm_info' 466 | if (!pm_info->ws_names) | ~~~~~~~ ^ ../drivers/soc/samsung/exynos-pm/exynos-pm.c:478:14: error: no member named 'ws_names' in 'struct exynos_pm_info' 478 | pm_info->ws_names[idx].name, size); | ~~~~~~~ ^ 8 errors generated. Signed-off-by: Nahuel Gómez --- include/soc/samsung/exynos-pm.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/soc/samsung/exynos-pm.h b/include/soc/samsung/exynos-pm.h index 9331d6140..84fe4cf4d 100755 --- a/include/soc/samsung/exynos-pm.h +++ b/include/soc/samsung/exynos-pm.h @@ -43,11 +43,9 @@ extern u64 exynos_get_eint_wake_mask(void); static inline u64 exynos_get_eint_wake_mask(void) { return ULLONG_MAX; } #endif -#if IS_ENABLED(CONFIG_SEC_PM_DEBUG) struct wakeup_stat_name { const char *name[32]; }; -#endif /* CONFIG_SEC_PM_DEBUG */ struct exynos_pm_info { void __iomem *eint_base; /* GPIO_ALIVE base to check wkup reason */ @@ -88,9 +86,7 @@ struct exynos_pm_info { u8 num_dbg_subsystem; const char **dbg_subsystem_name; u32 *dbg_subsystem_offset; -#if IS_ENABLED(CONFIG_SEC_PM_DEBUG) struct wakeup_stat_name *ws_names; /* Names of each bits of wakeup_stat */ -#endif /* CONFIG_SEC_PM_DEBUG */ }; struct exynos_pm_dbg {