Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1762754ybk; Sat, 16 May 2020 23:25:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe1z3wf3tPcLX1DgA6MGEltHH6XdwEiq9yq/7P7S0MoNwxNca0BMzPjkC6i6XqYFdtqAvh X-Received: by 2002:a17:906:d8c1:: with SMTP id re1mr10474750ejb.184.1589696709034; Sat, 16 May 2020 23:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589696709; cv=none; d=google.com; s=arc-20160816; b=sITpmxoSGOkevuiyRhuDNo1KqAeqN6FlwVee64Q5WQRixERckzaCs5eQxX0mDgRJw4 eDgHJ0NhiCF0xxUC3w4JPb1zxDzHQ1pBbw7yo89p5/ebFH9ZibvZxEwbEUH2MhCgpF9c qIYsX724yiV6Dfi9IIVIZsOFaWzaptoly8q+hj4cnlwGZmLOp4ajQHH20gfTflBNQvAB h2jcIu7luRaW4yZ748PsOqwmSOU0BhjtDygzuGulgPcg64vq9pB+2HDYCx/30bgTd4mV QvqQgHk6dHqKh7xyrLZ5gz5GykSysp3ZA+u2tR0CGiXq/BWya45CcoRMQJC495aeofPg zEuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Jcq/Z5uztx3pLMQLPL5UiRIqUGhz+I3t5uBdEFB7HmE=; b=OZWS3TKmKmznZhcieaaEjO7WezBFMKL62ifMdsjeU6QU3gDlDOWDNW04YJ9nm8ywCO xiYKUy3XnJJKnDSGepimrJgkB4ur5qO2/kWWjY2j5Ig4CNJKaYnSbPgqQCQ3ELirMGBk iV89qIPmt2wkpF06xhdCZTpBo9NNdC77OkNnHtCsPo/APmkWcFV5/jbTrLLz4CLQScfg z2hOQYbk25lOfwN1JnQ2K1CbblqgNwcwp3+1t7vwled6Rlo0kolhq+UlJucjvkSlGZhA xg32csq07C2VDaZ9Guz52O86r1Du1VV431tcHmKicw9oXPv5KU45D1em54WU5N63u8r9 9uKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 27si4949827ejy.121.2020.05.16.23.24.45; Sat, 16 May 2020 23:25:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgEQGVM (ORCPT + 99 others); Sun, 17 May 2020 02:21:12 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:52342 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbgEQGVK (ORCPT ); Sun, 17 May 2020 02:21:10 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 28BB5804B9; Sun, 17 May 2020 08:21:07 +0200 (CEST) Date: Sun, 17 May 2020 08:21:05 +0200 From: Sam Ravnborg To: Paul Cercueil Cc: David Airlie , Daniel Vetter , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, od@zcrc.me, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 05/12] gpu/drm: Ingenic: Fix opaque pointer casted to wrong type Message-ID: <20200517062105.GD609600@ravnborg.org> References: <20200516215057.392609-1-paul@crapouillou.net> <20200516215057.392609-5-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200516215057.392609-5-paul@crapouillou.net> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=MOBOZvRl c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=VwQbUJbxAAAA:8 a=ER_8r6IbAAAA:8 a=7gkXJVJtAAAA:8 a=e5mUnYsNAAAA:8 a=qQq3a1_-SCO9fxz2cd8A:9 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=9LHmKk7ezEChjTCyhBa9:22 a=E9Po1WZjFZOl8hwRPBS3:22 a=Vxmtnl_E_bksehYqCbjh:22 a=pHzHmUro8NiASowvMSCR:22 a=nt3jZW36AmriUCFCBwmW:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 16, 2020 at 11:50:50PM +0200, Paul Cercueil wrote: > The opaque pointer passed to the IRQ handler is a pointer to the > drm_device, not a pointer to our ingenic_drm structure. > > It still worked, because our ingenic_drm structure contains the > drm_device as its first field, so the pointer received had the same > value, but this was not semantically correct. > > Cc: stable@vger.kernel.org # v5.3 > Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs") > Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg > --- > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c > index 0c472382a08b..97244462599b 100644 > --- a/drivers/gpu/drm/ingenic/ingenic-drm.c > +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c > @@ -476,7 +476,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder, > > static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg) > { > - struct ingenic_drm *priv = arg; > + struct ingenic_drm *priv = drm_device_get_priv(arg); > unsigned int state; > > regmap_read(priv->map, JZ_REG_LCD_STATE, &state); > -- > 2.26.2 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel