Skip to content

Commit f720d0c

Browse files
arndbdavem330
authored andcommitted
kcm: mark helper functions inline
The stub helper functions for the newly added kcm_proc_init/exit interfaces are defined as 'static' in a header file, which leads to build warnings for each file that includes them without calling them: include/net/kcm.h:183:12: error: 'kcm_proc_init' defined but not used [-Werror=unused-function] include/net/kcm.h:184:13: error: 'kcm_proc_exit' defined but not used [-Werror=unused-function] This marks the two functions as 'static inline' instead, which avoids the warnings and is obviously what was meant here. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: cd6e111 ("kcm: Add statistics and proc interfaces") Signed-off-by: David S. Miller <[email protected]>
1 parent 798fee4 commit f720d0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/net/kcm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ struct kcm_mux {
180180
int kcm_proc_init(void);
181181
void kcm_proc_exit(void);
182182
#else
183-
static int kcm_proc_init(void) { return 0; }
184-
static void kcm_proc_exit(void) { }
183+
static inline int kcm_proc_init(void) { return 0; }
184+
static inline void kcm_proc_exit(void) { }
185185
#endif
186186

187187
static inline void aggregate_psock_stats(struct kcm_psock_stats *stats,

0 commit comments

Comments
 (0)