Skip to content

Commit fa47913

Browse files
GT119119Alexei Starovoitov
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 15a3b79 commit fa47913

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

net/bpf/test_run.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -524,27 +524,27 @@ __bpf_kfunc int bpf_fentry_test1(int a)
524524
}
525525
EXPORT_SYMBOL_GPL(bpf_fentry_test1);
526526

527-
int noinline bpf_fentry_test2(int a, u64 b)
527+
noinline int bpf_fentry_test2(int a, u64 b)
528528
{
529529
return a + b;
530530
}
531531

532-
int noinline bpf_fentry_test3(char a, int b, u64 c)
532+
noinline int bpf_fentry_test3(char a, int b, u64 c)
533533
{
534534
return a + b + c;
535535
}
536536

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)
538538
{
539539
return (long)a + b + c + d;
540540
}
541541

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)
543543
{
544544
return a + (long)b + c + d + e;
545545
}
546546

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)
548548
{
549549
return a + (long)b + c + d + (long)e + f;
550550
}
@@ -553,13 +553,13 @@ struct bpf_fentry_test_t {
553553
struct bpf_fentry_test_t *a;
554554
};
555555

556-
int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
556+
noinline int bpf_fentry_test7(struct bpf_fentry_test_t *arg)
557557
{
558-
asm volatile ("": "+r"(arg));
558+
asm volatile ("" : "+r"(arg));
559559
return (long)arg;
560560
}
561561

562-
int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
562+
noinline int bpf_fentry_test8(struct bpf_fentry_test_t *arg)
563563
{
564564
return (long)arg->a;
565565
}
@@ -569,12 +569,12 @@ __bpf_kfunc u32 bpf_fentry_test9(u32 *a)
569569
return *a;
570570
}
571571

572-
int noinline bpf_fentry_test10(const void *a)
572+
noinline int bpf_fentry_test10(const void *a)
573573
{
574574
return (long)a;
575575
}
576576

577-
void noinline bpf_fentry_test_sinfo(struct skb_shared_info *sinfo)
577+
noinline void bpf_fentry_test_sinfo(struct skb_shared_info *sinfo)
578578
{
579579
}
580580

@@ -598,7 +598,7 @@ __bpf_kfunc int bpf_modify_return_test_tp(int nonce)
598598
return nonce;
599599
}
600600

601-
int noinline bpf_fentry_shadow_test(int a)
601+
noinline int bpf_fentry_shadow_test(int a)
602602
{
603603
return a + 1;
604604
}

0 commit comments

Comments
 (0)