* [dpdk-test-report] |WARNING| pw35442 [PATCH RFC 6/7] net/af_xdp: load BPF file
[not found] <20180227093306.23854-7-qi.z.zhang@intel.com>
@ 2018-02-27 9:34 ` checkpatch
0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-02-27 9:34 UTC (permalink / raw)
To: test-report; +Cc: Qi Zhang
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/35442
_coding style issues_
ERROR:GLOBAL_INITIALISERS: do not initialise globals to 0
#109: FILE: drivers/net/af_xdp/bpf_load.c:44:
+int map_data_count = 0;
CHECK:CAMELCASE: Avoid CamelCase: <Elf>
#328: FILE: drivers/net/af_xdp/bpf_load.c:263:
+static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname,
CHECK:CAMELCASE: Avoid CamelCase: <GElf_Ehdr>
#328: FILE: drivers/net/af_xdp/bpf_load.c:263:
+static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname,
CHECK:CAMELCASE: Avoid CamelCase: <GElf_Shdr>
#329: FILE: drivers/net/af_xdp/bpf_load.c:264:
+ GElf_Shdr *shdr, Elf_Data **data)
CHECK:CAMELCASE: Avoid CamelCase: <Elf_Data>
#329: FILE: drivers/net/af_xdp/bpf_load.c:264:
+ GElf_Shdr *shdr, Elf_Data **data)
CHECK:CAMELCASE: Avoid CamelCase: <Elf_Scn>
#331: FILE: drivers/net/af_xdp/bpf_load.c:266:
+ Elf_Scn *scn;
CHECK:CAMELCASE: Avoid CamelCase: <GElf_Sym>
#360: FILE: drivers/net/af_xdp/bpf_load.c:295:
+ GElf_Sym sym;
CHECK:CAMELCASE: Avoid CamelCase: <GElf_Rel>
#361: FILE: drivers/net/af_xdp/bpf_load.c:296:
+ GElf_Rel rel;
CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#437: FILE: drivers/net/af_xdp/bpf_load.c:372:
+ sym = calloc(MAX_MAPS+1, sizeof(GElf_Sym));
^
CHECK:SPACING: spaces preferred around that '+' (ctx:VxV)
#439: FILE: drivers/net/af_xdp/bpf_load.c:374:
+ assert(nr_maps < MAX_MAPS+1);
^
CHECK:SPACING: No space is necessary after a cast
#504: FILE: drivers/net/af_xdp/bpf_load.c:439:
+ addr = (unsigned char*) def + map_sz_copy;
ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
#504: FILE: drivers/net/af_xdp/bpf_load.c:439:
+ addr = (unsigned char*) def + map_sz_copy;
CHECK:SPACING: No space is necessary after a cast
#505: FILE: drivers/net/af_xdp/bpf_load.c:440:
+ end = (unsigned char*) def + map_sz_elf;
ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
#505: FILE: drivers/net/af_xdp/bpf_load.c:440:
+ end = (unsigned char*) def + map_sz_elf;
CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#554: FILE: drivers/net/af_xdp/bpf_load.c:489:
+ for (i = 1; i < ehdr.e_shnum; i++) {
+
CHECK:SPACING: No space is necessary after a cast
#561: FILE: drivers/net/af_xdp/bpf_load.c:496:
+ shdr.sh_link, (int) shdr.sh_flags);
CHECK:SPACING: No space is necessary after a cast
#630: FILE: drivers/net/af_xdp/bpf_load.c:565:
+ insns = (struct bpf_insn *) data_prog->d_buf;
CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#641: FILE: drivers/net/af_xdp/bpf_load.c:576:
+ for (i = 1; i < ehdr.e_shnum; i++) {
+
CHECK:SPACING: No space is necessary after a cast
#727: FILE: drivers/net/af_xdp/bpf_load.c:662:
+ syms[i].addr = (long) addr;
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#1026: FILE: drivers/net/af_xdp/libbpf.h:86:
+#define BPF_LD_IMM64_RAW(DST, SRC, IMM) \
+ ((struct bpf_insn) { \
+ .code = BPF_LD | BPF_DW | BPF_IMM, \
+ .dst_reg = DST, \
+ .src_reg = SRC, \
+ .off = 0, \
+ .imm = (__u32) (IMM) }), \
+ ((struct bpf_insn) { \
+ .code = 0, /* zero is reserved opcode */ \
+ .dst_reg = 0, \
+ .src_reg = 0, \
+ .off = 0, \
+ .imm = ((__u64) (IMM)) >> 32 })
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'IMM' - possible side-effects?
#1026: FILE: drivers/net/af_xdp/libbpf.h:86:
+#define BPF_LD_IMM64_RAW(DST, SRC, IMM) \
+ ((struct bpf_insn) { \
+ .code = BPF_LD | BPF_DW | BPF_IMM, \
+ .dst_reg = DST, \
+ .src_reg = SRC, \
+ .off = 0, \
+ .imm = (__u32) (IMM) }), \
+ ((struct bpf_insn) { \
+ .code = 0, /* zero is reserved opcode */ \
+ .dst_reg = 0, \
+ .src_reg = 0, \
+ .off = 0, \
+ .imm = ((__u64) (IMM)) >> 32 })
CHECK:SPACING: No space is necessary after a cast
#1032: FILE: drivers/net/af_xdp/libbpf.h:92:
+ .imm = (__u32) (IMM) }), \
CHECK:SPACING: No space is necessary after a cast
#1038: FILE: drivers/net/af_xdp/libbpf.h:98:
+ .imm = ((__u64) (IMM)) >> 32 })
total: 4 errors, 0 warnings, 1157 lines checked
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-27 9:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20180227093306.23854-7-qi.z.zhang@intel.com>
2018-02-27 9:34 ` [dpdk-test-report] |WARNING| pw35442 [PATCH RFC 6/7] net/af_xdp: load BPF file checkpatch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).