From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <20190611193836.2772-1-shyam.saini@amarulasolutions.com> In-Reply-To: <20190611193836.2772-1-shyam.saini@amarulasolutions.com> From: Alexei Starovoitov Date: Tue, 11 Jun 2019 17:05:06 -0700 Message-ID: Subject: Re: [PATCH V2] include: linux: Regularise the use of FIELD_SIZEOF macro Content-Type: text/plain; charset="UTF-8" To: Shyam Saini Cc: Kernel Hardening , LKML , Andrew Morton , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Network Development , linux-ext4@vger.kernel.org, devel@lists.orangefs.org, linux-mm , linux-sctp@vger.kernel.org, bpf , kvm@vger.kernel.org, mayhs11saini@gmail.com List-ID: On Tue, Jun 11, 2019 at 5:00 PM Shyam Saini wrote: > > Currently, there are 3 different macros, namely sizeof_field, SIZEOF_FIELD > and FIELD_SIZEOF which are used to calculate the size of a member of > structure, so to bring uniformity in entire kernel source tree lets use > FIELD_SIZEOF and replace all occurrences of other two macros with this. > > For this purpose, redefine FIELD_SIZEOF in include/linux/stddef.h and > tools/testing/selftests/bpf/bpf_util.h and remove its defination from > include/linux/kernel.h please dont. bpf_util.h is a user space header. Please leave it as-is.