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

bpf: Standardize function declaration style

'noinlne' after 'int' cause
"ERROR: inline keyword should sit between storage class and type"
by checkpatch.pl

- Standardize function declaration style by moving 'noinline' modifier
- Fix asm volatile statement formatting

Signed-off-by: Li Jun <lijun01@kylinos.cn>
Link: https://lore.kernel.org/r/20250730105019.436235-1-lijun01@kylinos.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Li Jun and committed by
Alexei Starovoitov
fa479132 15a3b798

+11 -11
+11 -11
net/bpf/test_run.c
··· 524 524 } 525 525 EXPORT_SYMBOL_GPL(bpf_fentry_test1); 526 526 527 - int noinline bpf_fentry_test2(int a, u64 b) 527 + noinline int bpf_fentry_test2(int a, u64 b) 528 528 { 529 529 return a + b; 530 530 } 531 531 532 - int noinline bpf_fentry_test3(char a, int b, u64 c) 532 + noinline int bpf_fentry_test3(char a, int b, u64 c) 533 533 { 534 534 return a + b + c; 535 535 } 536 536 537 - int noinline bpf_fentry_test4(void *a, char b, int c, u64 d) 537 + noinline int bpf_fentry_test4(void *a, char b, int c, u64 d) 538 538 { 539 539 return (long)a + b + c + d; 540 540 } 541 541 542 - int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e) 542 + noinline int bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e) 543 543 { 544 544 return a + (long)b + c + d + e; 545 545 } 546 546 547 - int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f) 547 + noinline int bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f) 548 548 { 549 549 return a + (long)b + c + d + (long)e + f; 550 550 } ··· 553 553 struct bpf_fentry_test_t *a; 554 554 }; 555 555 556 - int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg) 556 + noinline int bpf_fentry_test7(struct bpf_fentry_test_t *arg) 557 557 { 558 - asm volatile ("": "+r"(arg)); 558 + asm volatile ("" : "+r"(arg)); 559 559 return (long)arg; 560 560 } 561 561 562 - int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg) 562 + noinline int bpf_fentry_test8(struct bpf_fentry_test_t *arg) 563 563 { 564 564 return (long)arg->a; 565 565 } ··· 569 569 return *a; 570 570 } 571 571 572 - int noinline bpf_fentry_test10(const void *a) 572 + noinline int bpf_fentry_test10(const void *a) 573 573 { 574 574 return (long)a; 575 575 } 576 576 577 - void noinline bpf_fentry_test_sinfo(struct skb_shared_info *sinfo) 577 + noinline void bpf_fentry_test_sinfo(struct skb_shared_info *sinfo) 578 578 { 579 579 } 580 580 ··· 598 598 return nonce; 599 599 } 600 600 601 - int noinline bpf_fentry_shadow_test(int a) 601 + noinline int bpf_fentry_shadow_test(int a) 602 602 { 603 603 return a + 1; 604 604 }