Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1542003ybk; Sat, 16 May 2020 14:57:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFCx+OWa8fZNmlfj/uPcXG5inZbElcPzHeaqTS1Jw811X5xs5uHozLQDhFs/brN0OehaFQ X-Received: by 2002:a17:906:509:: with SMTP id j9mr8769481eja.152.1589666220684; Sat, 16 May 2020 14:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589666220; cv=none; d=google.com; s=arc-20160816; b=bDYyUJNM7z9Gr7QGTFf6OV1IuhIopET/O6pVKKwnK3Cvxd4sRyuf/P8qcGhkaclURA D91Rj5RCUlz/gpmYu3eKBWNftsBtoUWpR5cUJ/4tWEKBeSt/D3n6f+RsCJO/d4a0/NIb ItGSV4dsjRG7pigA/tjCQvMuI1ZLNHU28eCGgF/TnuQmGr8ejXB8PsMU+GZv3H1NlAtV HDK06qi53e9YJbrmvme6u1Ch7NocnFpVLOSbgWKGG2hShXia5jiG4+/NneNX0+kgw52U p9qsjNDMURprUlPSLTZQBW/F3c2Ff3ZqymJRB1BdjWvAmKs8wNnmcbmLStfzMOSDp3h8 n7Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qffdGDv3DgtfzooGKPawMUzSJPFPf7ZHHFvRxoHINpg=; b=P17T85icEN8UK2X0w0ZNyspLPGjbgnO73TF8Qt3jGpzT9gbNTvOQ2/b0fEgUtoV+rd EqJPjeM61xS+FxV92VRroTv/YuM0XB9MF6SmICgUAeF2cuzduSIMTHclUm3TmkQHQKz4 sxhVvlWMZZFP/cTPFVicAIviiJ1B170ytyVN8itaiT5+4vBpsTmKkkjlFvRFwRIuiwUo zM13VN1zI3U3Ss9mzXvDFv0TlbUqqDVEIpky2ZENDmTPYAM0kg72R0R8qpWDh0YkaK7v VQLifhFBg2xqUyMm7qbgMmdcZY/1wBmOqHhOKpKjExF/i5PWe5k+sn3/HnHKatvBu5Wd RFaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=OHFD6DUX; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si3759659ejg.10.2020.05.16.14.56.38; Sat, 16 May 2020 14:57:00 -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; dkim=fail header.i=@crapouillou.net header.s=mail header.b=OHFD6DUX; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbgEPVvm (ORCPT + 99 others); Sat, 16 May 2020 17:51:42 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:46860 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbgEPVvl (ORCPT ); Sat, 16 May 2020 17:51:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1589665872; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qffdGDv3DgtfzooGKPawMUzSJPFPf7ZHHFvRxoHINpg=; b=OHFD6DUXNlYjXNKC6RI3DWsZnTlbGbayGdsGH/IYtQw1ElthnULEcHPG33W5ll/6Apam1d Cu+6aOiPk6W5veB0eMplQAwtw45H3KkiSZm4GshlzIQXts9t75nEZxkBFWH3M9i7LLHcXz wYY6YEpmnpvdUpaQ4HjaG0biVnQr6Gs= From: Paul Cercueil To: David Airlie , Daniel Vetter , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" Cc: od@zcrc.me, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil , stable@vger.kernel.org Subject: [PATCH 05/12] gpu/drm: Ingenic: Fix opaque pointer casted to wrong type Date: Sat, 16 May 2020 23:50:50 +0200 Message-Id: <20200516215057.392609-5-paul@crapouillou.net> In-Reply-To: <20200516215057.392609-1-paul@crapouillou.net> References: <20200516215057.392609-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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