From: Julia Lawall <julia.lawall@lip6.fr> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: kbuild-all@01.org, Daniel Vetter <daniel.vetter@intel.com>, Jani Nikula <jani.nikula@linux.intel.com>, David Airlie <airlied@linux.ie>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/i915: fix itnull.cocci warnings (fwd) Date: Mon, 18 Jan 2016 16:49:06 +0100 (CET) [thread overview] Message-ID: <alpine.DEB.2.10.1601181647260.2520@hadrien> (raw) 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;
WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@lip6.fr> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: David Airlie <airlied@linux.ie>, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kbuild-all@01.org, Daniel Vetter <daniel.vetter@intel.com> Subject: [PATCH] drm/i915: fix itnull.cocci warnings (fwd) Date: Mon, 18 Jan 2016 16:49:06 +0100 (CET) [thread overview] Message-ID: <alpine.DEB.2.10.1601181647260.2520@hadrien> (raw) 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
next reply other threads:[~2016-01-18 15:49 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-01-18 15:49 Julia Lawall [this message] 2016-01-18 15:49 ` [PATCH] drm/i915: fix itnull.cocci warnings (fwd) 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=alpine.DEB.2.10.1601181647260.2520@hadrien \ --to=julia.lawall@lip6.fr \ --cc=airlied@linux.ie \ --cc=daniel.vetter@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=jani.nikula@linux.intel.com \ --cc=kbuild-all@01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.