Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcD0IXP (ORCPT ); Wed, 27 Apr 2016 04:23:15 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38654 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752049AbcD0IXM (ORCPT ); Wed, 27 Apr 2016 04:23:12 -0400 MIME-Version: 1.0 In-Reply-To: <1461623608-29538-8-git-send-email-gustavo@padovan.org> References: <1461623608-29538-1-git-send-email-gustavo@padovan.org> <1461623608-29538-8-git-send-email-gustavo@padovan.org> Date: Wed, 27 Apr 2016 10:23:11 +0200 Message-ID: Subject: Re: [RFC v2 7/8] drm/fence: add fence timeline to drm_crtc From: Daniel Stone To: Gustavo Padovan Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Daniel Vetter , Riley Andrews , dri-devel , Linux Kernel Mailing List , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Gustavo Padovan , John Harrison Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 373 Lines: 13 Hi, On 26 April 2016 at 00:33, Gustavo Padovan wrote: > +static inline struct drm_crtc *fence_to_crtc(struct fence *fence) > +{ > + if (fence->ops != &drm_crtc_fence_ops) > + return NULL; Since this is (currently) only used before unconditional dereferences, maybe turn this into a BUG_ON instead of return NULL? Cheers, Daniel