Re: [PATCH V2] include: linux: Regularise the use of FIELD_SIZEOF macro

2019-06-11 Thread Shyam Saini
Hi Andrew, > > On Tue, 11 Jun 2019 15:00:10 -0600 Andreas Dilger wrote: > > > >> to FIELD_SIZEOF > > > > > > As Alexey has pointed out, C structs and unions don't have fields - > > > they have members. So this is an opportunity to switch everything to > > > a new member_sizeof(). > > > > > >

Re: [PATCH V2] include: linux: Regularise the use of FIELD_SIZEOF macro

2019-06-11 Thread Shyam Saini
Hi Kees, Cc'ing William Kucharski, > On Wed, Jun 12, 2019 at 01:08:36AM +0530, Shyam Saini wrote: > > In favour of FIELD_SIZEOF, this patch also deprecates other two similar > > macros sizeof_field and SIZEOF_FIELD. > > > > For code compatibility reason, retain size

[PATCH V2] include: linux: Regularise the use of FIELD_SIZEOF macro

2019-06-11 Thread Shyam Saini
, retain sizeof_field macro as a wrapper macro to FIELD_SIZEOF Signed-off-by: Shyam Saini --- Changelog: V1->V2 - Consolidate previous patch 1 and 2 into single patch - For code compatibility reason, retain sizeof_field macro as a wrapper macro to FIELD_SIZEOF arch/arm64/include/asm/processo

Re: [PATCH 1/2] include: linux: Regularise the use of FIELD_SIZEOF macro

2019-04-16 Thread Shyam Saini
Hi, On Mon, Apr 15, 2019 at 11:13 AM Alexei Starovoitov wrote: > > On Sun, Apr 14, 2019 at 2:15 AM 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

[PATCH 2/2] include: linux: Remove unused macros and their defination

2019-04-15 Thread Shyam Saini
In favour of FIELD_SIZEOF, lets deprecate other two similar macros sizeof_field and SIZEOF_FIELD, and remove them completely. Signed-off-by: Shyam Saini --- arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 7 --- include/linux/stddef.h | 8 tools/testing

[PATCH 1/2] include: linux: Regularise the use of FIELD_SIZEOF macro

2019-04-15 Thread Shyam Saini
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 --- arch/arm64/include/asm/processor.h | 10 +- arch/mips/cavium-octeon/executive/cvmx

[PATCH] gpu: drm: vmwgfx: Use kmemdup instead of kmalloc and memcpy

2016-12-24 Thread Shyam Saini
When some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini --- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 1/1] gpu: drm: gma500: Use vma_pages()

2016-10-10 Thread Shyam Saini
On Mon, 2016-10-10 at 01:46 +0200, Patrik Jakobsson wrote: > On Mon, Oct 10, 2016 at 1:07 AM, Shyam Saini > wrote: > > > > Replace explicit computation of vma page count by a call to > > vma_pages() > Hi, I already have this patch in the "queue" from: >

[PATCH 1/1] gpu: drm: gma500: Use vma_pages()

2016-10-10 Thread Shyam Saini
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Shyam Saini --- drivers/gpu/drm/gma500/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index