Commit ec2f8778 authored by Pankaj Bharadiya's avatar Pankaj Bharadiya Committed by Kees Cook
Browse files

treewide: Use sizeof_member() macro



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

This patch is generated using following script:

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

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

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

Signed-off-by: default avatarPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Link: https://lore.kernel.org/r/20190924105839.110713-3-pankaj.laxminarayan.bharadiya@intel.com


Co-developed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: David Miller <davem@davemloft.net> # for net/
parent 5ee857a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment