From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932375AbcARRU2 (ORCPT ); Mon, 18 Jan 2016 12:20:28 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36072 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932100AbcARRUW (ORCPT ); Mon, 18 Jan 2016 12:20:22 -0500 Date: Mon, 18 Jan 2016 18:20:25 +0100 From: Daniel Vetter To: Julia Lawall Cc: Maarten Lankhorst , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kbuild-all@01.org, Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix itnull.cocci warnings (fwd) Message-ID: <20160118172025.GM19130@phenom.ffwll.local> Mail-Followup-To: Julia Lawall , Maarten Lankhorst , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kbuild-all@01.org, Daniel Vetter References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.3.0-1-amd64 User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch