"call" is an argument of macro, but it is also used as a local variable name of function in macro. We should keep this local variable name distinct from any CPP macro parameter name if both are in the same macro scope, although it hasn't caused any problem yet. [ Impact: robustify macro ]
Unified · Split
| @@ -397,19 +397,19 @@ static void ftrace_profile_##call(proto) \ · 396 unmodified lines | ||
| 397 | 397 | perf_tpcounter_event(event_##call.id); \ |
| 398 | 398 | } \ |
| 399 | 399 | \ |
| 400 | −static int ftrace_profile_enable_##call(struct ftrace_event_call *call) \ | |
| 400 | +static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \ | |
| 401 | 401 | { \ |
| 402 | 402 | int ret = 0; \ |
| 403 | 403 | \ |
| 404 | − if (!atomic_inc_return(&call->profile_count)) \ | |
| 404 | + if (!atomic_inc_return(&event_call->profile_count)) \ | |
| 405 | 405 | ret = register_trace_##call(ftrace_profile_##call); \ |
| 406 | 406 | \ |
| 407 | 407 | return ret; \ |
| 408 | 408 | } \ |
| 409 | 409 | \ |
| 410 | −static void ftrace_profile_disable_##call(struct ftrace_event_call *call) \ | |
| 410 | +static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | |
| 411 | 411 | { \ |
| 412 | − if (atomic_add_negative(-1, &call->profile_count)) \ | |
| 412 | + if (atomic_add_negative(-1, &event_call->profile_count)) \ | |
| 413 | 413 | unregister_trace_##call(ftrace_profile_##call); \ |
| 414 | 414 | } |
| 415 | 415 | |
| @@ -433,9 +433,9 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *call) \ · 17 unmodified lines | ||
| 433 | 433 | #define __array(type, item, len) |
| 434 | 434 | |
| 435 | 435 | #undef __string |
| 436 | −#define __string(item, src) \ | |
| 437 | − __str_offsets.item = __str_size + \ | |
| 438 | − offsetof(typeof(*entry), __str_data); \ | |
| 436 | +#define __string(item, src) \ | |
| 437 | + __str_offsets.item = __str_size + \ | |
| 438 | + offsetof(typeof(*entry), __str_data); \ | |
| 439 | 439 | __str_size += strlen(src) + 1; |
| 440 | 440 | |
| 441 | 441 | #undef __assign_str |
| @@ -451,8 +451,8 @@ static struct ftrace_event_call event_##call; \ · 9 unmodified lines | ||
| 451 | 451 | \ |
| 452 | 452 | static void ftrace_raw_event_##call(proto) \ |
| 453 | 453 | { \ |
| 454 | − struct ftrace_str_offsets_##call __maybe_unused __str_offsets; \ | |
| 455 | − struct ftrace_event_call *call = &event_##call; \ | |
| 454 | + struct ftrace_str_offsets_##call __maybe_unused __str_offsets; \ | |
| 455 | + struct ftrace_event_call *event_call = &event_##call; \ | |
| 456 | 456 | struct ring_buffer_event *event; \ |
| 457 | 457 | struct ftrace_raw_##call *entry; \ |
| 458 | 458 | unsigned long irq_flags; \ |
| @@ -473,7 +473,7 @@ static void ftrace_raw_event_##call(proto) \ · 14 unmodified lines | ||
| 473 | 473 | \ |
| 474 | 474 | assign; \ |
| 475 | 475 | \ |
| 476 | − if (!filter_current_check_discard(call, entry, event)) \ | |
| 476 | + if (!filter_current_check_discard(event_call, entry, event)) \ | |
| 477 | 477 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ |
| 478 | 478 | } \ |
| 479 | 479 | \ |