|
Message-ID: <CAOfkYf5FZdN3v9pkcdNmyJM5O=789bKwFmFsMTp20RE=gVgwqQ@mail.gmail.com> Date: Mon, 15 Apr 2019 12:43:39 +0530 From: Shyam Saini <mayhs11saini@...il.com> To: Alexei Starovoitov <alexei.starovoitov@...il.com> Cc: Shyam Saini <shyam.saini@...rulasolutions.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, LKML <linux-kernel@...r.kernel.org>, Andrew Morton <akpm@...ux-foundation.org>, Kees Cook <keescook@...omium.org>, linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org, intel-gvt-dev@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org, dri-devel <dri-devel@...ts.freedesktop.org>, Network Development <netdev@...r.kernel.org>, linux-ext4@...r.kernel.org, devel@...ts.orangefs.org, linux-mm <linux-mm@...ck.org>, linux-sctp@...r.kernel.org, bpf <bpf@...r.kernel.org>, kvm@...r.kernel.org Subject: Re: [PATCH 1/2] include: linux: Regularise the use of FIELD_SIZEOF macro Hi, On Mon, Apr 15, 2019 at 11:13 AM Alexei Starovoitov <alexei.starovoitov@...il.com> wrote: > > On Sun, Apr 14, 2019 at 2:15 AM Shyam Saini > <shyam.saini@...rulasolutions.com> 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 > > > > Signed-off-by: Shyam Saini <shyam.saini@...rulasolutions.com> > > --- > > arch/arm64/include/asm/processor.h | 10 +++++----- > > arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 2 +- > > drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- > > drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 4 ++-- > > fs/befs/linuxvfs.c | 2 +- > > fs/ext2/super.c | 2 +- > > fs/ext4/super.c | 2 +- > > fs/freevxfs/vxfs_super.c | 2 +- > > fs/orangefs/super.c | 2 +- > > fs/ufs/super.c | 2 +- > > include/linux/kernel.h | 9 --------- > > include/linux/slab.h | 2 +- > > include/linux/stddef.h | 11 ++++++++++- > > kernel/fork.c | 2 +- > > kernel/utsname.c | 2 +- > > net/caif/caif_socket.c | 2 +- > > net/core/skbuff.c | 2 +- > > net/ipv4/raw.c | 2 +- > > net/ipv6/raw.c | 2 +- > > net/sctp/socket.c | 4 ++-- > > tools/testing/selftests/bpf/bpf_util.h | 11 ++++++++++- > > tools/ directory is for user space pieces that don't include kernel's include. > I bet your pathes break the user space builds. I think it shouldn't because I haven't included any kernel header in tool/ files, instead I have introduced definition of macro in tool/ , so this patch doesn't create any dependency on kernel headers. Thanks a lot, Shyam
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.