bpf: minor cleanups in helpers
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 9 Sep 2016 00:45:28 +0000 (02:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Sep 2016 02:36:03 +0000 (19:36 -0700)
commit6088b5823b4cb132a838878747384cbfb5ce6646
tree83d13b9cc765fa76212ba29d4eda9723f6c02e5e
parentbf8d85d4f907d2156e6e5d2831378527957d9bde
bpf: minor cleanups in helpers

Some minor misc cleanups, f.e. use sizeof(__u32) instead of hardcoding
and in __bpf_skb_max_len(), I missed that we always have skb->dev valid
anyway, so we can drop the unneeded test for dev; also few more other
misc bits addressed here.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/helpers.c
net/core/filter.c