All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
@ 2017-03-15 17:39 Chris Wilson
  2017-03-15 18:09 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-03-16  9:37 ` [PATCH] " Mika Kuoppala
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-15 17:39 UTC (permalink / raw)
  To: intel-gvt-dev; +Cc: intel-gfx

Compute the offset of the end of the crc32 field using offsetofend()
rather than open-coding.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
---
 drivers/gpu/drm/i915/gvt/firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c
index 933a7c211a1c..3a5a81fcb406 100644
--- a/drivers/gpu/drm/i915/gvt/firmware.c
+++ b/drivers/gpu/drm/i915/gvt/firmware.c
@@ -159,7 +159,7 @@ static int verify_firmware(struct intel_gvt *gvt,
 
 	h = (struct gvt_firmware_header *)fw->data;
 
-	crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
+	crc32_start = offsetofend(struct gvt_firmware_header, crc32);
 	mem = fw->data + crc32_start;
 
 #define VERIFY(s, a, b) do { \
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
  2017-03-15 17:39 [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof Chris Wilson
@ 2017-03-15 18:09 ` Patchwork
  2017-03-16  9:37 ` [PATCH] " Mika Kuoppala
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-03-15 18:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
URL   : https://patchwork.freedesktop.org/series/21309/
State : success

== Summary ==

Series 21309v1 drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
https://patchwork.freedesktop.org/api/1.0/series/21309/revisions/1/mbox/

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 459s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 574s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 538s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 556s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 503s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 500s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 435s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 433s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 439s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 512s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 501s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 485s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 477s
fi-skl-6700hq    total:53   pass:45   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 486s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 524s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 550s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 417s

9a2b1c7caa7c45e1ec5ae6183a70a2d259101f2e drm-tip: 2017y-03m-15d-15h-52m-11s UTC integration manifest
07f88e2 drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4187/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
  2017-03-15 17:39 [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof Chris Wilson
  2017-03-15 18:09 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-16  9:37 ` Mika Kuoppala
  2018-05-16 16:38   ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Mika Kuoppala @ 2017-03-16  9:37 UTC (permalink / raw)
  To: Chris Wilson, intel-gvt-dev; +Cc: intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Compute the offset of the end of the crc32 field using offsetofend()
> rather than open-coding.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> Cc: Zhi Wang <zhi.a.wang@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/gvt/firmware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c
> index 933a7c211a1c..3a5a81fcb406 100644
> --- a/drivers/gpu/drm/i915/gvt/firmware.c
> +++ b/drivers/gpu/drm/i915/gvt/firmware.c
> @@ -159,7 +159,7 @@ static int verify_firmware(struct intel_gvt *gvt,
>  
>  	h = (struct gvt_firmware_header *)fw->data;
>  
> -	crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
> +	crc32_start = offsetofend(struct gvt_firmware_header, crc32);
>  	mem = fw->data + crc32_start;
>  
>  #define VERIFY(s, a, b) do { \
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
  2017-03-16  9:37 ` [PATCH] " Mika Kuoppala
@ 2018-05-16 16:38   ` Chris Wilson
  2018-05-17 13:52     ` Zhenyu Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-05-16 16:38 UTC (permalink / raw)
  To: Mika Kuoppala, intel-gvt-dev; +Cc: intel-gfx

Quoting Mika Kuoppala (2017-03-16 09:37:44)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Compute the offset of the end of the crc32 field using offsetofend()
> > rather than open-coding.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> > Cc: Zhi Wang <zhi.a.wang@intel.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

This still applies...

> > ---
> >  drivers/gpu/drm/i915/gvt/firmware.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c
> > index 933a7c211a1c..3a5a81fcb406 100644
> > --- a/drivers/gpu/drm/i915/gvt/firmware.c
> > +++ b/drivers/gpu/drm/i915/gvt/firmware.c
> > @@ -159,7 +159,7 @@ static int verify_firmware(struct intel_gvt *gvt,
> >  
> >       h = (struct gvt_firmware_header *)fw->data;
> >  
> > -     crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
> > +     crc32_start = offsetofend(struct gvt_firmware_header, crc32);
> >       mem = fw->data + crc32_start;
> >  
> >  #define VERIFY(s, a, b) do { \
> > -- 
> > 2.11.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof
  2018-05-16 16:38   ` Chris Wilson
@ 2018-05-17 13:52     ` Zhenyu Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Zhenyu Wang @ 2018-05-17 13:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, intel-gvt-dev


[-- Attachment #1.1: Type: text/plain, Size: 1853 bytes --]

On 2018.05.16 17:38:30 +0100, Chris Wilson wrote:
> Quoting Mika Kuoppala (2017-03-16 09:37:44)
> > Chris Wilson <chris@chris-wilson.co.uk> writes:
> > 
> > > Compute the offset of the end of the crc32 field using offsetofend()
> > > rather than open-coding.
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> > > Cc: Zhi Wang <zhi.a.wang@intel.com>
> > 
> > Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> 
> This still applies...
>

Sorry for missed this one! Will pick it up for sure.

> > > ---
> > >  drivers/gpu/drm/i915/gvt/firmware.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c
> > > index 933a7c211a1c..3a5a81fcb406 100644
> > > --- a/drivers/gpu/drm/i915/gvt/firmware.c
> > > +++ b/drivers/gpu/drm/i915/gvt/firmware.c
> > > @@ -159,7 +159,7 @@ static int verify_firmware(struct intel_gvt *gvt,
> > >  
> > >       h = (struct gvt_firmware_header *)fw->data;
> > >  
> > > -     crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
> > > +     crc32_start = offsetofend(struct gvt_firmware_header, crc32);
> > >       mem = fw->data + crc32_start;
> > >  
> > >  #define VERIFY(s, a, b) do { \
> > > -- 
> > > 2.11.0
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-17 13:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 17:39 [PATCH] drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof Chris Wilson
2017-03-15 18:09 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-16  9:37 ` [PATCH] " Mika Kuoppala
2018-05-16 16:38   ` Chris Wilson
2018-05-17 13:52     ` Zhenyu Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.