Skip to content

Commit

Permalink
nfp: bpf: correct printk formats for size_t
Browse files Browse the repository at this point in the history
Build bot reported warning about invalid printk formats on 32bit
architectures.  Use %zu for size_t and %zd ptr diff.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Jakub Kicinski authored and borkmann committed Dec 15, 2017
1 parent 1c45597 commit 0bce7c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/netronome/nfp/bpf/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int nfp_bpf_parse_capabilities(struct nfp_app *app)
}
}
if (mem - start != nfp_cpp_area_size(area)) {
nfp_err(cpp, "BPF capabilities left after parsing, parsed:%lu total length:%lu\n",
nfp_err(cpp, "BPF capabilities left after parsing, parsed:%zd total length:%zu\n",
mem - start, nfp_cpp_area_size(area));
goto err_release_free;
}
Expand All @@ -235,7 +235,7 @@ static int nfp_bpf_parse_capabilities(struct nfp_app *app)
return 0;

err_release_free:
nfp_err(cpp, "invalid BPF capabilities at offset:%ld\n", mem - start);
nfp_err(cpp, "invalid BPF capabilities at offset:%zd\n", mem - start);
nfp_cpp_area_release_free(area);
return -EINVAL;
}
Expand Down

0 comments on commit 0bce7c9

Please sign in to comment.