Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

accel/qaic: mark debugfs stub functions as static inline

The alternative stub functions are listed as global, which produces
a build failure in some configs:

In file included from drivers/accel/qaic/qaic_drv.c:31:
drivers/accel/qaic/qaic_debugfs.h:16:5: error: no previous prototype for 'qaic_bootlog_register' [-Werror=missing-prototypes]
16 | int qaic_bootlog_register(void) { return 0; }
| ^~~~~~~~~~~~~~~~~~~~~
drivers/accel/qaic/qaic_debugfs.h:17:6: error: no previous prototype for 'qaic_bootlog_unregister' [-Werror=missing-prototypes]
17 | void qaic_bootlog_unregister(void) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/accel/qaic/qaic_debugfs.h:18:6: error: no previous prototype for 'qaic_debugfs_init' [-Werror=missing-prototypes]
18 | void qaic_debugfs_init(struct qaic_drm_device *qddev) {}
| ^~~~~~~~~~~~~~~~~

Make them static inline as intended.

Fixes: 5f8df5c6def6 ("accel/qaic: Add bootlog debugfs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409133945.2976190-1-arnd@kernel.org

authored by

Arnd Bergmann and committed by
Jeffrey Hugo
42d34193 76b801aa

+3 -3
+3 -3
drivers/accel/qaic/qaic_debugfs.h
··· 13 13 void qaic_bootlog_unregister(void); 14 14 void qaic_debugfs_init(struct qaic_drm_device *qddev); 15 15 #else 16 - int qaic_bootlog_register(void) { return 0; } 17 - void qaic_bootlog_unregister(void) {} 18 - void qaic_debugfs_init(struct qaic_drm_device *qddev) {} 16 + static inline int qaic_bootlog_register(void) { return 0; } 17 + static inline void qaic_bootlog_unregister(void) {} 18 + static inline void qaic_debugfs_init(struct qaic_drm_device *qddev) {} 19 19 #endif /* CONFIG_DEBUG_FS */ 20 20 #endif /* __QAIC_DEBUGFS_H__ */