]> git.proxmox.com Git - mirror_ovs.git/commit
datapath: Use sizeof_field macro
authorPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Fri, 6 Mar 2020 22:37:17 +0000 (14:37 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 6 Mar 2020 22:39:35 +0000 (14:39 -0800)
commit9cfa471811be29e88ca89dc698690611cea1707a
tree766b7b3797b03c53435a4418395cd3d6a0fb3886
parent384868caafc3b188319a3a9b9b3ede4ef910273d
datapath: Use sizeof_field macro

Upstream commit:
    commit c593642c8be046915ca3a4a300243a68077cd207
    Author: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
    Date:   Mon Dec 9 10:31:43 2019 -0800

    treewide: Use sizeof_field() macro

    Replace all the occurrences of FIELD_SIZEOF() with sizeof_field() except
    at places where these are defined. Later patches will remove the unused
    definition of FIELD_SIZEOF().

    This patch is generated using following script:

    EXCLUDE_FILES="include/linux/stddef.h|include/linux/kernel.h"

    git grep -l -e "\bFIELD_SIZEOF\b" | while read file;
    do

     if [[ "$file" =~ $EXCLUDE_FILES ]]; then
     continue
     fi
     sed -i  -e 's/\bFIELD_SIZEOF\b/sizeof_field/g' $file;
    done

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Link: https://lore.kernel.org/r/20190924105839.110713-3-pankaj.laxminarayan.bharadiya@intel.com
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: David Miller <davem@davemloft.net> # for net
Also added a compatibility layer macro for older kernels that still
use FIELD_SIZEOF

Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
datapath/datapath.c
datapath/flow.h
datapath/linux/compat/geneve.c
datapath/linux/compat/gso.c
datapath/linux/compat/include/linux/kernel.h
datapath/linux/compat/include/net/ip_tunnels.h
datapath/linux/compat/ip6_gre.c
datapath/linux/compat/ip_gre.c
datapath/linux/compat/vxlan.c