* [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 15:49 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-01-18 15:49 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: kbuild-all, Daniel Vetter, Jani Nikula, David Airlie, intel-gfx,
dri-devel, linux-kernel
List_for_each entry binds its first argument to an offset from the list
pointer, so this should not be NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
Please take the patch only if it's a positive warning. Thanks!
intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
struct intel_flip_work *work;
list_for_each_entry(work, &crtc->flip_work, head) {
- if (work && work->event &&
+ if (work->event &&
work->event->base.file_priv == file) {
kfree(work->event);
work->event = NULL;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 15:49 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-01-18 15:49 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: David Airlie, intel-gfx, linux-kernel, dri-devel, kbuild-all,
Daniel Vetter
List_for_each entry binds its first argument to an offset from the list
pointer, so this should not be NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
Please take the patch only if it's a positive warning. Thanks!
intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
struct intel_flip_work *work;
list_for_each_entry(work, &crtc->flip_work, head) {
- if (work && work->event &&
+ if (work->event &&
work->event->base.file_priv == file) {
kfree(work->event);
work->event = NULL;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
2016-01-18 15:49 ` Julia Lawall
@ 2016-01-18 17:20 ` Daniel Vetter
-1 siblings, 0 replies; 12+ messages in thread
From: Daniel Vetter @ 2016-01-18 17:20 UTC (permalink / raw)
To: Julia Lawall
Cc: Maarten Lankhorst, David Airlie, intel-gfx, linux-kernel,
dri-devel, kbuild-all, Daniel Vetter
On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> List_for_each entry binds its first argument to an offset from the list
> pointer, so this should not be NULL.
>
> Generated by: scripts/coccinelle/iterators/itnull.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> Please take the patch only if it's a positive warning. Thanks!
Against which tree is this? I can't find this anywhere like that ...
-Daniel
>
> intel_display.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> struct intel_flip_work *work;
>
> list_for_each_entry(work, &crtc->flip_work, head) {
> - if (work && work->event &&
> + if (work->event &&
> work->event->base.file_priv == file) {
> kfree(work->event);
> work->event = NULL;
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 17:20 ` Daniel Vetter
0 siblings, 0 replies; 12+ messages in thread
From: Daniel Vetter @ 2016-01-18 17:20 UTC (permalink / raw)
To: Julia Lawall
Cc: intel-gfx, linux-kernel, dri-devel, kbuild-all, Daniel Vetter
On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> List_for_each entry binds its first argument to an offset from the list
> pointer, so this should not be NULL.
>
> Generated by: scripts/coccinelle/iterators/itnull.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> Please take the patch only if it's a positive warning. Thanks!
Against which tree is this? I can't find this anywhere like that ...
-Daniel
>
> intel_display.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> struct intel_flip_work *work;
>
> list_for_each_entry(work, &crtc->flip_work, head) {
> - if (work && work->event &&
> + if (work->event &&
> work->event->base.file_priv == file) {
> kfree(work->event);
> work->event = NULL;
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
2016-01-18 17:20 ` Daniel Vetter
@ 2016-01-18 17:42 ` Eric Engestrom
-1 siblings, 0 replies; 12+ messages in thread
From: Eric Engestrom @ 2016-01-18 17:42 UTC (permalink / raw)
To: daniel
Cc: julia.lawall, dri-devel, intel-gfx, linux-kernel, daniel.vetter,
kbuild-all
I expect this is the script she mentions:
https://github.com/coccinelle/coccinellery/blob/master/itnull/itnull.cocci
Julia is one of the authors of Coccinelle, and the author of that script :)
On 18/01/16 17:20, Daniel Vetter wrote:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
>> List_for_each entry binds its first argument to an offset from the list
>> pointer, so this should not be NULL.
>>
>> Generated by: scripts/coccinelle/iterators/itnull.cocci
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>> Please take the patch only if it's a positive warning. Thanks!
>
> Against which tree is this? I can't find this anywhere like that ...
> -Daniel
>
>>
>> intel_display.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
>> struct intel_flip_work *work;
>>
>> list_for_each_entry(work, &crtc->flip_work, head) {
>> - if (work && work->event &&
>> + if (work->event &&
>> work->event->base.file_priv == file) {
>> kfree(work->event);
>> work->event = NULL;
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 17:42 ` Eric Engestrom
0 siblings, 0 replies; 12+ messages in thread
From: Eric Engestrom @ 2016-01-18 17:42 UTC (permalink / raw)
To: daniel
Cc: intel-gfx, linux-kernel, dri-devel, julia.lawall, kbuild-all,
daniel.vetter
I expect this is the script she mentions:
https://github.com/coccinelle/coccinellery/blob/master/itnull/itnull.cocci
Julia is one of the authors of Coccinelle, and the author of that script :)
On 18/01/16 17:20, Daniel Vetter wrote:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
>> List_for_each entry binds its first argument to an offset from the list
>> pointer, so this should not be NULL.
>>
>> Generated by: scripts/coccinelle/iterators/itnull.cocci
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>> Please take the patch only if it's a positive warning. Thanks!
>
> Against which tree is this? I can't find this anywhere like that ...
> -Daniel
>
>>
>> intel_display.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
>> struct intel_flip_work *work;
>>
>> list_for_each_entry(work, &crtc->flip_work, head) {
>> - if (work && work->event &&
>> + if (work->event &&
>> work->event->base.file_priv == file) {
>> kfree(work->event);
>> work->event = NULL;
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
2016-01-18 17:42 ` Eric Engestrom
@ 2016-01-18 18:02 ` Daniel Vetter
-1 siblings, 0 replies; 12+ messages in thread
From: Daniel Vetter @ 2016-01-18 18:02 UTC (permalink / raw)
To: Eric Engestrom
Cc: daniel, julia.lawall, dri-devel, intel-gfx, linux-kernel,
daniel.vetter, kbuild-all
On Mon, Jan 18, 2016 at 05:42:24PM +0000, Eric Engestrom wrote:
> I expect this is the script she mentions:
> https://github.com/coccinelle/coccinellery/blob/master/itnull/itnull.cocci
>
> Julia is one of the authors of Coccinelle, and the author of that script :)
I get how these patches get created, I just can't find a tree anywhere
where this applies. So I wonder what it was generated against ...
-Daniel
>
>
> On 18/01/16 17:20, Daniel Vetter wrote:
> > On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> >> List_for_each entry binds its first argument to an offset from the list
> >> pointer, so this should not be NULL.
> >>
> >> Generated by: scripts/coccinelle/iterators/itnull.cocci
> >>
> >> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> >> ---
> >>
> >> Please take the patch only if it's a positive warning. Thanks!
> >
> > Against which tree is this? I can't find this anywhere like that ...
> > -Daniel
> >
> >>
> >> intel_display.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> >> struct intel_flip_work *work;
> >>
> >> list_for_each_entry(work, &crtc->flip_work, head) {
> >> - if (work && work->event &&
> >> + if (work->event &&
> >> work->event->base.file_priv == file) {
> >> kfree(work->event);
> >> work->event = NULL;
> >> _______________________________________________
> >> Intel-gfx mailing list
> >> Intel-gfx@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 18:02 ` Daniel Vetter
0 siblings, 0 replies; 12+ messages in thread
From: Daniel Vetter @ 2016-01-18 18:02 UTC (permalink / raw)
To: Eric Engestrom
Cc: intel-gfx, linux-kernel, dri-devel, julia.lawall, kbuild-all,
daniel.vetter
On Mon, Jan 18, 2016 at 05:42:24PM +0000, Eric Engestrom wrote:
> I expect this is the script she mentions:
> https://github.com/coccinelle/coccinellery/blob/master/itnull/itnull.cocci
>
> Julia is one of the authors of Coccinelle, and the author of that script :)
I get how these patches get created, I just can't find a tree anywhere
where this applies. So I wonder what it was generated against ...
-Daniel
>
>
> On 18/01/16 17:20, Daniel Vetter wrote:
> > On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> >> List_for_each entry binds its first argument to an offset from the list
> >> pointer, so this should not be NULL.
> >>
> >> Generated by: scripts/coccinelle/iterators/itnull.cocci
> >>
> >> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> >> ---
> >>
> >> Please take the patch only if it's a positive warning. Thanks!
> >
> > Against which tree is this? I can't find this anywhere like that ...
> > -Daniel
> >
> >>
> >> intel_display.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> >> struct intel_flip_work *work;
> >>
> >> list_for_each_entry(work, &crtc->flip_work, head) {
> >> - if (work && work->event &&
> >> + if (work->event &&
> >> work->event->base.file_priv == file) {
> >> kfree(work->event);
> >> work->event = NULL;
> >> _______________________________________________
> >> Intel-gfx mailing list
> >> Intel-gfx@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
2016-01-18 17:20 ` Daniel Vetter
@ 2016-01-18 20:20 ` Julia Lawall
-1 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-01-18 20:20 UTC (permalink / raw)
To: Daniel Vetter
Cc: Julia Lawall, Maarten Lankhorst, David Airlie, intel-gfx,
linux-kernel, dri-devel, kbuild-all, Daniel Vetter
On Mon, 18 Jan 2016, Daniel Vetter wrote:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> > List_for_each entry binds its first argument to an offset from the list
> > pointer, so this should not be NULL.
> >
> > Generated by: scripts/coccinelle/iterators/itnull.cocci
> >
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > ---
> >
> > Please take the patch only if it's a positive warning. Thanks!
>
> Against which tree is this? I can't find this anywhere like that ...
I don't know. It may be against a submitted patch.
In case it turns out to be useful, I forgot:
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> -Daniel
>
> >
> > intel_display.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> > struct intel_flip_work *work;
> >
> > list_for_each_entry(work, &crtc->flip_work, head) {
> > - if (work && work->event &&
> > + if (work->event &&
> > work->event->base.file_priv == file) {
> > kfree(work->event);
> > work->event = NULL;
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-18 20:20 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-01-18 20:20 UTC (permalink / raw)
To: Daniel Vetter
Cc: David Airlie, intel-gfx, linux-kernel, dri-devel, Julia Lawall,
kbuild-all, Daniel Vetter
On Mon, 18 Jan 2016, Daniel Vetter wrote:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
> > List_for_each entry binds its first argument to an offset from the list
> > pointer, so this should not be NULL.
> >
> > Generated by: scripts/coccinelle/iterators/itnull.cocci
> >
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > ---
> >
> > Please take the patch only if it's a positive warning. Thanks!
>
> Against which tree is this? I can't find this anywhere like that ...
I don't know. It may be against a submitted patch.
In case it turns out to be useful, I forgot:
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> -Daniel
>
> >
> > intel_display.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -16498,7 +16498,7 @@ void intel_modeset_preclose(struct drm_d
> > struct intel_flip_work *work;
> >
> > list_for_each_entry(work, &crtc->flip_work, head) {
> > - if (work && work->event &&
> > + if (work->event &&
> > work->event->base.file_priv == file) {
> > kfree(work->event);
> > work->event = NULL;
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
2016-01-18 17:20 ` Daniel Vetter
@ 2016-01-20 10:05 ` Maarten Lankhorst
-1 siblings, 0 replies; 12+ messages in thread
From: Maarten Lankhorst @ 2016-01-20 10:05 UTC (permalink / raw)
To: Julia Lawall, David Airlie, intel-gfx, linux-kernel, dri-devel,
kbuild-all, Daniel Vetter
Op 18-01-16 om 18:20 schreef Daniel Vetter:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
>> List_for_each entry binds its first argument to an offset from the list
>> pointer, so this should not be NULL.
>>
>> Generated by: scripts/coccinelle/iterators/itnull.cocci
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>> Please take the patch only if it's a positive warning. Thanks!
> Against which tree is this? I can't find this anywhere like that ...
>
Looks to like it happens in my tree.
drm/i915: Convert flip_work to a list.
~Maarten
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd)
@ 2016-01-20 10:05 ` Maarten Lankhorst
0 siblings, 0 replies; 12+ messages in thread
From: Maarten Lankhorst @ 2016-01-20 10:05 UTC (permalink / raw)
To: Julia Lawall, David Airlie, intel-gfx, linux-kernel, dri-devel,
kbuild-all, Daniel Vetter
Op 18-01-16 om 18:20 schreef Daniel Vetter:
> On Mon, Jan 18, 2016 at 04:49:06PM +0100, Julia Lawall wrote:
>> List_for_each entry binds its first argument to an offset from the list
>> pointer, so this should not be NULL.
>>
>> Generated by: scripts/coccinelle/iterators/itnull.cocci
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>> ---
>>
>> Please take the patch only if it's a positive warning. Thanks!
> Against which tree is this? I can't find this anywhere like that ...
>
Looks to like it happens in my tree.
drm/i915: Convert flip_work to a list.
~Maarten
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-01-20 10:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 15:49 [PATCH] drm/i915: fix itnull.cocci warnings (fwd) Julia Lawall
2016-01-18 15:49 ` Julia Lawall
2016-01-18 17:20 ` [Intel-gfx] " Daniel Vetter
2016-01-18 17:20 ` Daniel Vetter
2016-01-18 17:42 ` Eric Engestrom
2016-01-18 17:42 ` Eric Engestrom
2016-01-18 18:02 ` Daniel Vetter
2016-01-18 18:02 ` Daniel Vetter
2016-01-18 20:20 ` [Intel-gfx] " Julia Lawall
2016-01-18 20:20 ` Julia Lawall
2016-01-20 10:05 ` [Intel-gfx] " Maarten Lankhorst
2016-01-20 10:05 ` Maarten Lankhorst
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.