@@ -180,13 +180,13 @@ extern int static_call_text_reserved(void *start, void *end);
180
180
181
181
extern long __static_call_return0 (void );
182
182
183
- #define __DEFINE_STATIC_CALL (name , _func , _func_init ) \
183
+ #define DEFINE_STATIC_CALL (name , _func ) \
184
184
DECLARE_STATIC_CALL(name, _func); \
185
185
struct static_call_key STATIC_CALL_KEY(name) = { \
186
- .func = _func_init, \
186
+ .func = _func, \
187
187
.type = 1, \
188
188
}; \
189
- ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func_init )
189
+ ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func )
190
190
191
191
#define DEFINE_STATIC_CALL_NULL (name , _func ) \
192
192
DECLARE_STATIC_CALL(name, _func); \
@@ -225,12 +225,12 @@ extern long __static_call_return0(void);
225
225
226
226
static inline int static_call_init (void ) { return 0 ; }
227
227
228
- #define __DEFINE_STATIC_CALL (name , _func , _func_init ) \
228
+ #define DEFINE_STATIC_CALL (name , _func ) \
229
229
DECLARE_STATIC_CALL(name, _func); \
230
230
struct static_call_key STATIC_CALL_KEY(name) = { \
231
- .func = _func_init, \
231
+ .func = _func, \
232
232
}; \
233
- ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func_init )
233
+ ARCH_DEFINE_STATIC_CALL_TRAMP(name, _func )
234
234
235
235
#define DEFINE_STATIC_CALL_NULL (name , _func ) \
236
236
DECLARE_STATIC_CALL(name, _func); \
@@ -292,11 +292,11 @@ static inline long __static_call_return0(void)
292
292
.func = _func_init, \
293
293
}
294
294
295
+ #define DEFINE_STATIC_CALL (name , _func ) \
296
+ __DEFINE_STATIC_CALL(name, _func, _func)
297
+
295
298
#define DEFINE_STATIC_CALL_NULL (name , _func ) \
296
- DECLARE_STATIC_CALL(name, _func); \
297
- struct static_call_key STATIC_CALL_KEY(name) = { \
298
- .func = NULL, \
299
- }
299
+ __DEFINE_STATIC_CALL(name, _func, NULL)
300
300
301
301
#define DEFINE_STATIC_CALL_RET0 (name , _func ) \
302
302
__DEFINE_STATIC_CALL(name, _func, __static_call_return0)
@@ -341,7 +341,4 @@ static inline int static_call_text_reserved(void *start, void *end)
341
341
342
342
#endif /* CONFIG_HAVE_STATIC_CALL */
343
343
344
- #define DEFINE_STATIC_CALL (name , _func ) \
345
- __DEFINE_STATIC_CALL(name, _func, _func)
346
-
347
344
#endif /* _LINUX_STATIC_CALL_H */
0 commit comments