History

tracing: Remove DECLARE_TRACE_NOARGS

This macro was intentionally broken so that the kernel code is not poluted with such noargs macro used simply as markers. This use case can be satisfied by using dummy no inline functions. Just remove it. Link: http://lkml.kernel.org/r/20200413153246.8511-1-nborisov@suse.com

Nikolay Borisov committed 6 years ago

Commit a2806ef1 parent 353da871 file · +1 −21Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/tracepoint.h+1−21
@@ -156,8 +156,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 155 unmodified lines
156 * Note, the proto and args passed in includes "__data" as the first parameter.156 * Note, the proto and args passed in includes "__data" as the first parameter.
157 * The reason for this is to handle the "void" prototype. If a tracepoint157 * The reason for this is to handle the "void" prototype. If a tracepoint
158 * has a "void" prototype, then it is invalid to declare a function158 * has a "void" prototype, then it is invalid to declare a function
159 * as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just159 * as "(void *, void)".
160 * "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto".
161 */160 */
162#define __DO_TRACE(tp, proto, args, cond, rcuidle) \161#define __DO_TRACE(tp, proto, args, cond, rcuidle) \
163 do { \162 do { \
@@ -373,25 +372,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) · 209 unmodified lines
373# define __tracepoint_string372# define __tracepoint_string
374#endif373#endif
375 374
376/*
377 * The need for the DECLARE_TRACE_NOARGS() is to handle the prototype
378 * (void). "void" is a special value in a function prototype and can
379 * not be combined with other arguments. Since the DECLARE_TRACE()
380 * macro adds a data element at the beginning of the prototype,
381 * we need a way to differentiate "(void *data, proto)" from
382 * "(void *data, void)". The second prototype is invalid.
383 *
384 * DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype
385 * and "void *__data" as the callback prototype.
386 *
387 * DECLARE_TRACE() passes "proto" as the tracepoint protoype and
388 * "void *__data, proto" as the callback prototype.
389 */
390#define DECLARE_TRACE_NOARGS(name) \
391 __DECLARE_TRACE(name, void, , \
392 cpu_online(raw_smp_processor_id()), \
393 void *__data, __data)
394
395#define DECLARE_TRACE(name, proto, args) \375#define DECLARE_TRACE(name, proto, args) \
396 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \376 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
397 cpu_online(raw_smp_processor_id()), \377 cpu_online(raw_smp_processor_id()), \