From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932269AbcARRms (ORCPT ); Mon, 18 Jan 2016 12:42:48 -0500 Received: from [195.59.15.196] ([195.59.15.196]:61128 "EHLO mailapp01.imgtec.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932216AbcARRmo (ORCPT ); Mon, 18 Jan 2016 12:42:44 -0500 Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd) References: <20160118172025.GM19130@phenom.ffwll.local> From: Eric Engestrom CC: , , , , , To: Message-ID: <569D2400.9030702@imgtec.com> Date: Mon, 18 Jan 2016 17:42:24 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160118172025.GM19130@phenom.ffwll.local> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.60.4.28] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> >> 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 >